Working with our design partners to deliver advanced web-based solutions

Home page

Blog

 

 

Include the currency converter on your site

Do your visitors need to convert from one currency to another? For example if you are quoting prices in US dollars, you might want to give visitors a handy utility to conversion to their own currency. You could link to a currency converter on someone else's site, but once they leave, will they return? You want to provide them with a calculator right there on your page as part of your site.

To incorporate our compact javascript calculator. You simply include some html in your page, and any client with netscape 3, IE4 or better will have a fast effective calculator.

You can even initialise the calculator with the currency and amount of your product, so that all they have to do is dial up the currency of their choice and get an instant conversion.

Add the converter to your site now

The converter can be placed anywhere on your site. Put it on every page if you want, it is small enough to fit into your heading or footer sections.

However for technical reasons you can only have a maximum of one converter per page.

Standard converter

To include the standard converter on your site use the following:

<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><tr><td><FORM NAME="textor"><P>
<INPUT TYPE="hidden" NAME="texaccept" VALUE="site operator accepts conditions at http://cconv.textor.com">
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://cconv.textor.com/conv.js"> </SCRIPT><FONT FACE="Arial"
SIZE="-3">Currency converter &copy; <A HREF="http://www.textor.com/">Textor Webmasters Ltd </a></FONT></P></FORM></TD></TR></TABLE>

You must include everything exactly as shown.

The converter will default to US Dollars as the base currency. To change to another currency you can add the following code after the above:
<SCRIPT LANGUAGE="JavaScript1.1">
document.textor.cur1.selectedIndex=3;
</SCRIPT>
This will set Australian dollars as the base. The numbers start at zero, US Dollars=0; Euro=1 etc. Note that this code may need to be changed if we add new currencies in the future so you need to check from time to time.

Unless you include the hidden variable accepting the conditions on this site the program will not work. However these conditions are not onerous.

Special converter

To include the converter with pre-set values:

<FORM NAME="textor1">
<INPUT TYPE="hidden" NAME="texaccept" VALUE="site operator accepts conditions at http://cconv.textor.com">
<INPUT TYPE="hidden" NAME="basevalue" VALUE="45.67">
<INPUT TYPE="hidden" NAME="basecurrency" VALUE="GBP">
<INPUT TYPE="hidden" NAME="initialcurrency" VALUE="USD">
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://cconv.textor.com/conv1a.js"> </SCRIPT>
<BR> <FONT FACE="Arial" SIZE="-3">Currency converter &copy; <A HREF="http://www.textor.com/">Textor Webmasters Ltd </a></FONT> </FORM>

Again, please include everything as shown, except that the hidden variables should be set to the values you require.In this example the price of the product is £ 45.67 (British Pounds) and the web page will initially show the price in US dollars. The following hidden variables must be set:

  • texaccept- set to the statement that the site operator accepts the conditions at the converter web site
  • basevalue- in this case 45.67
  • basecurrency- is an integer corresponding to the position of the currency in the list. In this case we want Pounds Sterling so it is set to 5. Find the index numbers by using the drop down list in the examples on the main page and count from zero. If you wanted US Dollars to be the base, set this to zero.
  • initialcurrency- the default currency shown is US Dollars (US Dollars are index zero). If you want to see what is under the hood, samples of the Javascript are here and here. But don't use these scripts live. The exchange rates built into them need regular updating, which is why they are loaded in live use from our site.

If you want to see what is under the hood, a sample of the Javascript is here. But don't use this script live. The exchange rates built into it needs regular updating, which is why the scripts are loaded in live use from our site.