Posted By

misnyo on 11/06/07


Tagged

javascript google money change short


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

arcturus
vali29


currency changer with google


 / Published in: JavaScript
 

A simple code for changing currencies using Google:)

  1. <script type="text/javascript">
  2.  
  3. function callGoogle(){
  4.  
  5. var form=document.getElementById("Gform");
  6. var link="http://www.google.hu/search?q="+form.elements["value"].value+"+"+form.elements["from"].value+"+to+"+form.elements["to"].value;
  7. location.href=link;
  8.  
  9. }
  10.  
  11. </script>
  12.  
  13. <form id="Gform">
  14.  
  15. <input type="text" name="value" size="6">
  16.  
  17. <select name="from">
  18. <option>EUR
  19. <option>HUF
  20. <option>GBP
  21. <option>AUD
  22. <option>CZK
  23. <option>DKK
  24. <option>JPY
  25. <option>CAD
  26. <option>PLN
  27. <option>NOK
  28. <option>CHF
  29. <option>SEK
  30. <option>SKK
  31. <option>USD
  32. </select>
  33.  
  34. TO
  35.  
  36. <select name="to">
  37. <option>HUF
  38. <option>GBP
  39. <option>AUD
  40. <option>CZK
  41. <option>DKK
  42. <option>EUR
  43. <option>JPY
  44. <option>CAD
  45. <option>PLN
  46. <option>NOK
  47. <option>CHF
  48. <option>SEK
  49. <option>SKK
  50. <option>USD
  51. </select>
  52.  
  53. <input type="button" onclick="callGoogle()" value="Change!">
  54.  
  55. </form>

Report this snippet  

You need to login to post a comment.