HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/hyperflight/! bs3/inc-template-currency.asp
<!-- see http://designwithpc.com/Plugins/ddSlick -->            
            

<style>
.dd-select {
  border-radius: 4px;
}

.dd-selected, .dd-option {
  padding: 3px 10px 3px 10px;

}
.dd-selected-text, .dd-option-text {
  margin-bottom: 0px;
}
.dd-selected-description {

}
</style>            

            <div>          
<%=GetCurrencyCombo("", "")%>
            </div>
    
<script>
$('#ddCurrencyCode').ddslick({  
    imagePosition: "right",
    background: "white",
    width: "150px",
    onSelected: function(data){
      itp_dd_select_currency(data.selectedData.value);        
    }
});

// for selecting currency from this special control
function itp_dd_select_currency(ACurrencyCode)
{
  //alert(ACurrencyCode)
 // alert(document.getElementById('CurrencyCode').value);

  // if currency changed then select it
  if (ACurrencyCode != document.getElementById('CurrencyCode').value) {
    itp_currency(ACurrencyCode)
  }
}
</script>

<%

' (SS,20/6/17) ACurrencyCurrencyCode used because this special combo control removes the one from the select form field
Sub ShowCurrencyComboHeader(ACurrentCurrencyCode)
%>   
<input type="hidden" id="CurrencyCode" name="CurrencyCode" value="<%=ACurrentCurrencyCode%>" />
<select id="ddCurrencyCode">
<%    
End Sub

' (SS,19/6/17) currency ACurrencyName is in the format GBP - British Pound 
Sub ShowCurrencyComboItem(ACurrencyCode, ACurrencyName, AIsSelected)
  Dim LCurrencyNameNoCode, LSelected
  LCurrencyNameNoCode = Trim(Mid(ACurrencyName, 7))
%>
<option value="<%=ACurrencyCode%>" data-imagesrc="/common/flags/currency/32/<%=LCase(ACurrencyCode)%>.png" data-description="<%=LCurrencyNameNoCode%>" <%=Iif(AIsSelected, " selected=""selected""", "")%>><%=ACurrencyCode%></option>
<%
End Sub

Sub ShowCurrencyComboFooter
%>
</select>
<%
End Sub
%>