hi,

i am basically using a button, Prototype/AJAX, and PHP to update a
user's location. something simple as typing 'Chicago, IL'. After the
script, it rewrites the result in a div tag.

here is the form i'm using:

<div id="hometown_result">Aurora, IL</div>

<form action="" method="post" name="form_hometown" id="form_hometown">
<input name="new_hometown" type="text" style="width:98%;"
maxlength="175" /><br /><br />
<input name="set_hometown" type="image" class="btn"
onclick="change_little_things(document.form_hometown.new_hometown.value,
'hometown', '32154'); return false;" value="Change Hometown" src="/
vm_images/build/set_hometown.jpg" />
</form>

here is the javascript:

function change_little_things(data, type, member_key)
{
        var b64data = Base64.encode(data);
        var url = 'php_ajax.php?type=' + type + '&data=' + b64data +
'&member_key=' + member_key;
        new Ajax.Updater( { success: type + '_result', failure: type +
'_result' }, url);
}

the php_ajax.php file runs a database call, updates the info, then
spits back the new location into the "hometown_result" div.

it works no problem at all on Firefox, Safari, etc.
but for whatever reason, it is not working on at all on internet
explorer and it's driving me crazy.
in a pinch i can rewrite it to update via a normal page refresh and
php script, but it would just be nice because it is such a small
update to do it via Ajax, and a somewhat for my own education as well.
i have searched google and everything, and i cannot find out what the
issue is.

i am a little new to prototype, but if i'm missing something simple,
please don't hesitate to call me an idiot.

thanks1
Dennis
thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to