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?FeedbackID=389736

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

  }


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to