Hi,

Don't take this the wrong way, but unless you're using a different
version of Prototype than I've seen (I've only ever used 1.6 onward),
I think you really need to read through the docs a bit more
thoroughly:

http://www.prototypejs.org/api/ajax/options
http://www.prototypejs.org/api/ajax/updater

At a glance, there are at least a couple of problems with your use of
Ajax.Updater:

1. You're using options in the options object that don't exist (there
is no "success" option).
2. You're missing a parameter to the constructor.
3. The parameters you have supplied are in the wrong order.

...and it's entirely possible you meant to use Ajax.Request rather
than Ajax.Updater; I can't be sure.

Hope this helps,
--
T.J. Crowder
tj / crowder software / com

On Jun 13, 12:16 am, themayanlion <[EMAIL PROTECTED]> wrote:
> 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 rubyonrails-spinoffs@googlegroups.com
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