« A Clean Sweep | Main | Autum in Yosemite »

November 06, 2007

IE and Nested Forms

I was just adding a new feature to the beneighbor.com website to take the user to the last page they visted when they complete login. Before this I was simply sending the user to the homepage of the site. This approach was not very user friendly and I wanted to have the user go back to the page that prompted the login. So I added a hidden field that would hold the return page and any CGI parameters to the login page and loaded that when the page was rendered. The login form is something like this

<form>
  <fieldset>
  <input for username>
  <input for password>
  <submit for login form>
  <form for password retreival>
   <input for email>    <submit for email form>
  </form>
 </fieldset>
 <hidden field for return>(broken on IE7)
</form>

Well this worked fine for Firefox, but for IE7, the hidden field was blank. I thought about it for a bit and decided that IE expected the hidden field to be before the submit button, not just inside the form tag. Pretty bonehead if you ask me, but whatever. I moved the tag to just after the fieldset start tag and it worked. Just something to remember when you have nested forms.

Posted by Hefe at November 6, 2007 02:33 PM

Comments

Cool blog
Thanks, webmaster.

Posted by: best dollar savings accounts worldwide at August 25, 2008 02:23 PM

Post a comment




Remember Me?