Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7597667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:12:46+00:00 2026-05-30T22:12:46+00:00

I have a conversion rate script which i know works perfectly outside of a

  • 0

I have a conversion rate script which i know works perfectly outside of a Google gadget however i cannot figure out why it doesn’t work inside of a gadget.

Here is my XML:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
    <ModulePrefs author="Purefx.co.uk" height="280"></ModulePrefs>
    <UserPref name="title" display_name="Widget Title" default_value="Currency Converter"/>
    <UserPref name="color" display_name="Widget color" default_value="Color" datatype="enum">
        <EnumValue value="Color"/>
        <EnumValue value="Black and White"/>
    </UserPref>
    <UserPref name="style" display_name="Widget Style" default_value="Sidebar" datatype="enum">
        <EnumValue value="Sidebar"/>
        <EnumValue value="header/footer"/>
    </UserPref>
    <UserPref name="attribution" display_name="Attribution text" default_value="Purefx" datatype="enum">
        <EnumValue value="Purefx"/>
        <EnumValue value="Foreign Exchange"/>
        <EnumValue value="Currency exchange"/>
    </UserPref> 
    <Content type="html"><![CDATA[

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

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

     //Get all the values
     var amount = $('#amount').val();
     var from = $('#from').val();
     var to = $('#to').val();

     //Make data string
     var dataString = "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);
           }
         });
    });
});
</script>
]]>
</Content>
</Module>

I haven’t included the html part of the content or the php script as that part is 100% working and irrelevant to this problem.

I think the problem is specifically the execution of the Ajax call, on clicking ‘convert’ nothing is being ‘posted’ in the firebug console window.

I can’t find anything that might suggest i’m missing something so any thoughts are appreciated.

Many thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:12:47+00:00Added an answer on May 30, 2026 at 10:12 pm

    You cannot make direct calls from inside a gadget because a gadget lives inside a gadget container and all calls are proxied by the gadget container.

    You must use io.makeRequest to fetch remote data.

    More info, see http://code.google.com/apis/gadgets/docs/remote-content.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that is setting conversion rates depending on input boxes (works
this is the use case I'm trying to figure this out for. I have
I know a lot of iOS conversion questions have been asked before but I
I have the following implicit conversion for java.util.Enumerations implicit def enumerationIterator[A](e : Enumeration[A]) :
I have a question concerning number conversion i JS. I have a number like
I have to create a regular expression for some path conversion. Example for path
I have a string containing byte data. How can I perform an in-place conversion
Are there any standalone type conversion libraries? I have a data storage system that
I have used many of the Convert.To..... functions for conversion , but I didn't
I have the following code: Some functions: A::A(int i_a) {cout<<int Ctor\n;} //conversion constructor void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.