How can I get currency converter Google html code?

Asked By 20 points N/A Posted on -
qa-featured

How can I get currency converter google html code to help build a new currency converter and what are the restrictions for such intended use of the code?

SHARE
Best Answer by jasonf kknisely
Best Answer
Best Answer
Answered By 0 points N/A #142034

How can I get currency converter Google html code?

qa-featured

Hi,

Google provide API for currency converter. You will have to dived the code in to three components

1. HTML

2. AJAX

3. PHP

1. Html consists of one textbox, two dropdown lists and a button. By clicking the button the data is displayed in label.

2. On click paste the code behind the button for conversion

$(document).ready(function() {

 

 $('#convert').click(function(){

 

 //Get all the values

 varamount = $('#amount').val();

 varfrom = $('#fromCurrency').val();

 varto = $('#toCurrency').val();

 

 //Make data string

 vardataString = "amount="+ amount + "&from="+ from + "&to="+ to;

 

 $.ajax({

 type: "POST",

 url: "ajax_converter.php",

 data: dataString,

 

 success: function(data){

 //Show results div

 $('#results').show();

 

 //Put received response into result div

 $('#results').html(data);

 }

 

 });

 });

});

 

3. Now fetch the value in the script and display them by using php. Kindly use these functions in your code and you will get the results.

a)  Function file_get_contents

b)  Function explode Click here to switch to the beta php.net site

c)  Function round Click here to switch to the beta php.net site

d)  Function ucwords Click here to switch to the beta php.net site

Answered By 5 points N/A #142035

How can I get currency converter Google html code?

qa-featured

 

You can add the below HTML code to your website with correct dimensions. This gadget does the calculation through Google API and the gadget itself provided by Google. You can see its functions by pasting the below code into a notepad and save it as a HTML file. Then double click the HTML file and you’ll see the gadget working.

<!–script parameters: design=true|false : designed or simple component | width=180 : set the width of your tool (not for designed mode)–><a href='https://en.swissquote.com/forex' id='ACMLink'>Forex</a> <script language='javascript' src='http://www.tradingtoolsonline.com/converter-script.aspx?design=false' type='text/javascript'></script>

You can find more information about the above gadget and other available Google gadgets from below link.

https://www.google.com

Related Questions