Hi
I have a function that works fine in FF but throws an error in IE:
<script language="JavaScript" type="text/JavaScript">
// <![CDATA[
function doSums() {
new Ajax.Updater(''fruit'', ''../calculators/
personal_member_calculator.php'', { method: ''post'',
parameters:
form1.serialize() });
}
// ]]>
</script>
called thus:
<select id="age" name="age" onchange="doSums();
return false;">
Seems so simple - as I''m sure the answer will be!
Many thanks....
emrys
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Frederick Polgardy
2008-Jun-06 10:51 UTC
Re: onChange won''t fire prototype function in ie
Where is the variable form1 being defined? It''s in your function, but I don''t see where it gets its value. A hunch is to try $(form1).serialize(), since you might have an unextended form object, and IE is less forgiving about those. On Fri, Jun 6, 2008 at 5:47 AM, McBlaue <emrys.hughes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi > > I have a function that works fine in FF but throws an error in IE: > > <script language="JavaScript" type="text/JavaScript"> > // <![CDATA[ > function doSums() { > new Ajax.Updater(''fruit'', ''../calculators/ > personal_member_calculator.php'', { method: ''post'', parameters: > form1.serialize() }); > } > // ]]> > </script> > > called thus: > > <select id="age" name="age" onchange="doSums(); return false;">-- Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Or possibly even $(''form1'').serialize(), if you don''t
have a variable
at all and you''re just using the ID.
--
T.J. Crowder
tj / crowder software / com
On Jun 6, 11:51 am, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org>
wrote:> Where is the variable form1 being defined? It''s in your function,
but I
> don''t see where it gets its value. A hunch is to try
$(form1).serialize(),
> since you might have an unextended form object, and IE is less forgiving
> about those.
>
>
>
> On Fri, Jun 6, 2008 at 5:47 AM, McBlaue
<emrys.hug...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Hi
>
> > I have a function that works fine in FF but throws an error in IE:
>
> > <script language="JavaScript"
type="text/JavaScript">
> > // <![CDATA[
> > function doSums() {
> > new Ajax.Updater(''fruit'',
''../calculators/
> > personal_member_calculator.php'', { method:
''post'', parameters:
> > form1.serialize() });
> > }
> > // ]]>
> > </script>
>
> > called thus:
>
> > <select id="age" name="age"
onchange="doSums(); return false;">
>
> --
> Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
$(''form1'').serialize() is the answer....many thanks!
On Jun 6, 9:45 pm, "T.J. Crowder"
<tjcrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Or possibly even $(''form1'').serialize(), if you
don''t have a variable
> at all and you''re just using the ID.
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Jun 6, 11:51 am, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
>
> > Where is the variable form1 being defined? It''s in your
function, but I
> > don''t see where it gets its value. A hunch is to try
$(form1).serialize(),
> > since you might have an unextended form object, and IE is less
forgiving
> > about those.
>
> > On Fri, Jun 6, 2008 at 5:47 AM, McBlaue
<emrys.hug...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > Hi
>
> > > I have a function that works fine in FF but throws an error in
IE:
>
> > > <script language="JavaScript"
type="text/JavaScript">
> > > // <![CDATA[
> > > function doSums() {
> > > new Ajax.Updater(''fruit'',
''../calculators/
> > > personal_member_calculator.php'', { method:
''post'', parameters:
> > > form1.serialize() });
> > > }
> > > // ]]>
> > > </script>
>
> > > called thus:
>
> > > <select id="age" name="age"
onchange="doSums(); return false;">
>
> > --
> > Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---