Hi, I think i''ve found a potential bug with Form.Serialize when used in conjunction with Ajax.Updater. This problem does not exist with Mozilla (tested on Camino and Firefox 2). <form method="get" name="setDetails" action="app.php" id="details" onsubmit="new Ajax.Updater(''content'', ''app.php'', {method: ''get'', parameters: this.serialize(true)}); return false;"> <fieldset> <input name="action" type="hidden" id="action" value="setDetails" />First Name/Surname:<br /><input name="forename" type="text" class="text" maxlength="100" value="<?=$_SESSION[''cForename'']?>" /><input name="surname" type="text" class="text" maxlength="100"value="<?=$_SESSION[''cSurname'']?>" /><br /> Address:<br /><input name="address" type="text" class="text" maxlength="100" value="<?=$_SESSION[''cAddress'']?>" /><br /> Town or City:<br /><input name="town" type="text" class="text" maxlength="100" value="<?=$_SESSION[''cTown'']?>" /><br /> County/Country:<br /><input name="county" type="text" class="text" maxlength="100" value="<?=$_SESSION[''cCounty'']?>" /><? include ''countries.txt'';?><br /> Postcode:<br /><input name="postcode" type="text" class="text" maxlength="9" value="<?=$_SESSION[''cPostcode'']?>" /><br /> Email Address:<br /><input name="email" type="text" class="text" maxlength="100" value="<?=$_SESSION[''cEmail'']?>" /><br /> Contact Number (preferably Mobile):<br /><input name="telephone" type="text" class="text" maxlength="20" value="<?$_SESSION[''cTelephone'']?>" /><br /> Number of Adults: <select name="nAdult" class="bigselect"> <option value="1">1</option> <option value="2" selected="selected">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> Number of Children: <select name="nChild" class="bigselect"> <option value="0" selected="selected">None</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select><br /> Special Requests (if any):<br /><textarea name="message" rows="4" class="text" id="msg"><?=$_SESSION[''cMessage'']?></textarea> </fieldset> <input name="submit" id="button" class="button" type="submit" value="Continue" onclick="this.disable();" /><br /><br /> </form> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, I think i''ve found a potential bug with Form.Serialize when used in conjunction with Ajax.Updater. This problem does not exist with Mozilla (tested on Camino and Firefox 2). <div id="content"><ajax response please></div> <form method="get" name="setDetails" action="shouldnt_execute.php" id="details" onsubmit="new Ajax.Updater(''content'', ''app.php'', {method: ''get'', parameters: this.serialize(true)}); return false;"> <fieldset> <input name="action" type="hidden" id="action" value="setDetails" /> First Name/Surname:<br /><input name="forename" type="text" /> ... </fieldset> <input name="submit" id="button" type="submit" value="Continue" onclick="this.disable();" /><br /><br /> </form> So here we have a simple form. app.php is not even called, instead shouldnt_execute.php does. the "return false;" is completely ignored by IE and Safari, so it submits the form instead of calling the Ajax.Updater. Extremely annoying as it means I must write a custom function to submit each field individually. Anyone help? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
****Ignore this top post, don''t know what happened there.**** On Jul 21, 6:30 pm, JamesG <mailmeh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I think i''ve found a potential bug with Form.Serialize when used > in conjunction with Ajax.Updater. > This problem does not exist with Mozilla (tested on Camino and Firefox > 2). > > <form method="get" name="setDetails" action="app.php" id="details" > onsubmit="new Ajax.Updater(''content'', ''app.php'', {method: ''get'', > parameters: this.serialize(true)}); return false;"> > <fieldset> > <input name="action" type="hidden" id="action" value="setDetails" / > > First Name/Surname:<br /><input name="forename" type="text" > class="text" maxlength="100" value="<?=$_SESSION[''cForename'']?>" /><input name="surname" type="text" class="text" maxlength="100" > > value="<?=$_SESSION[''cSurname'']?>" /><br /> > Address:<br /><input name="address" type="text" class="text" > maxlength="100" value="<?=$_SESSION[''cAddress'']?>" /><br /> > Town or City:<br /><input name="town" type="text" class="text" > maxlength="100" value="<?=$_SESSION[''cTown'']?>" /><br /> > County/Country:<br /><input name="county" type="text" class="text" > maxlength="100" value="<?=$_SESSION[''cCounty'']?>" /><? include > ''countries.txt'';?><br /> > Postcode:<br /><input name="postcode" type="text" class="text" > maxlength="9" value="<?=$_SESSION[''cPostcode'']?>" /><br /> > Email Address:<br /><input name="email" type="text" class="text" > maxlength="100" value="<?=$_SESSION[''cEmail'']?>" /><br /> > Contact Number (preferably Mobile):<br /><input name="telephone" > type="text" class="text" maxlength="20" value="<?> $_SESSION[''cTelephone'']?>" /><br /> > Number of Adults: <select name="nAdult" class="bigselect"> > <option value="1">1</option> > <option value="2" selected="selected">2</option> > <option value="3">3</option> > <option value="4">4</option> > <option value="5">5</option> > </select> > Number of Children: <select name="nChild" class="bigselect"> > <option value="0" selected="selected">None</option> > <option value="1">1</option> > <option value="2">2</option> > <option value="3">3</option> > </select><br /> > Special Requests (if any):<br /><textarea name="message" rows="4" > class="text" id="msg"><?=$_SESSION[''cMessage'']?></textarea> > </fieldset> > <input name="submit" id="button" class="button" type="submit" > value="Continue" onclick="this.disable();" /><br /><br /> > </form>--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---