Return to Snippet

Revision: 4200
at November 6, 2007 05:05 by misnyo


Updated Code
<script type="text/javascript">

function callGoogle(){

var form=document.getElementById("Gform");
var link="http://www.google.hu/search?q="+form.elements["value"].value+"+"+form.elements["from"].value+"+to+"+form.elements["to"].value;
location.href=link;

}

</script>

<form id="Gform">

<input type="text" name="value" size="6">

<select name="from">
<option>EUR
<option>HUF
<option>GBP
<option>AUD
<option>CZK
<option>DKK
<option>JPY
<option>CAD
<option>PLN
<option>NOK
<option>CHF
<option>SEK
<option>SKK
<option>USD
</select>

 TO 

<select name="to">
<option>HUF
<option>GBP
<option>AUD
<option>CZK
<option>DKK
<option>EUR
<option>JPY
<option>CAD
<option>PLN
<option>NOK
<option>CHF
<option>SEK
<option>SKK
<option>USD
</select>

<input type="button" onclick="callGoogle()" value="Change!">

</form>

Revision: 4199
at November 6, 2007 05:04 by misnyo


Initial Code
<script type="text/javascript">

function callGoogle(){

var form=document.getElementById("Gform");
var 

link="http://www.google.hu/search?q="+form.elements["value"].value+"+"+form.elements["from"].value+"+to+"+form.eleme

nts["to"].value;
location.href=link;

}

</script>

<form id="Gform">

<input type="text" name="value" size="6">

<select name="from">
<option>EUR
<option>HUF
<option>GBP
<option>AUD
<option>CZK
<option>DKK
<option>JPY
<option>CAD
<option>PLN
<option>NOK
<option>CHF
<option>SEK
<option>SKK
<option>USD
</select>

 TO 

<select name="to">
<option>HUF
<option>GBP
<option>AUD
<option>CZK
<option>DKK
<option>EUR
<option>JPY
<option>CAD
<option>PLN
<option>NOK
<option>CHF
<option>SEK
<option>SKK
<option>USD
</select>

<input type="button" onclick="callGoogle()" value="Change!">

</form>

Initial URL

                                

Initial Description
A simple code for changing currencies using Google:)

Initial Title
currency changer with google

Initial Tags
javascript, google

Initial Language
JavaScript