That works perfectly. Thanks. On Aug 7, 11:43 am, David Pollak <feeder.of.the.be...@gmail.com> wrote: > When you use a Button and it doesn't get included in the POST (either on IE8 > or for Ajax forms), use the SHtml.hidden() method to include a hidden field > that's included in the server request. > > > > On Thu, Aug 6, 2009 at 7:39 AM, Ryan Donahue <donahu...@gmail.com> wrote: > > > Apparently if your form has only one text field (input tag w/ > > type=text) and one button tag, IE8 does not include the button as a > > field in the post, but only includes the text field. Here's the IE8 > > bug report: > > >https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackI... > > > The result is that my function that is bound to the button is not > > called when processing the post. I've worked around it by adding > > another input tag of type=text and style=display:none (hidden field > > didn't fix it). > > > Anyway, just wanted to post a heads up and see if anybody else has > > come across this. > > > The relevant code is below. > > > Template: > > > <lift:MemberSnippet.sendConfirmation form="POST"> > > <fieldset> > > <legend>Confirm Email Address</legend> > > <p>First, we need to confirm your email address so we know it's > > yours.</p> > > <label>Email Address:</label><br/><signup:email/><br/> > > <signup:submit/> > > </fieldset> > > </lift:MemberSnippet.sendConfirmation> > > > Snippet: > > > //note that my SForm.button is just the same as SHtml.submit but I use > > a button instead of input w/ type=submit > > > def sendConfirmation(xhtml:NodeSeq) : NodeSeq = { > > > def doConfirm() : Any = { > > if (email.is.length > 0) { > > try { > > MemberSystem.confirmEmailAddress(email.is) > > notice("Your confirmation email will be sent in a few > > moments.") > > hideForms.set(true) > > } > > catch { > > case MemberSystem.InvalidEmailAddressException(msg) => > > error("The email address you provided "+msg) > > case MemberSystem.EmailAddressAlreadyInUseException => > > error("The email address you provided is already being > > used by another member") > > case _ => > > error("We were unable to send to this email address, > > please try another") > > } > > } > > else { error ("Email address is required") ; Empty} > > } > > > if (!hideForms.is) > > bind("signup", xhtml, > > "email" -> FocusOnLoad(SForm.text(email.is, email(_))), > > "submit" -> SForm.button("Send Confirmation", doConfirm)) > > else Nil > > > } > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---