Click to See Complete Forum and Search --> : problem with "input type=image"
mikec2003
07-20-2003, 05:14 PM
I'm using this (http://javascript.internet.com/navigation/htaccess-login.html) script to force users to log into a page on my site. It works fine as is.
Problem is that when I change the input type to an 'image' instead of 'button' it breaks the form somehow.
Thanks for any help!
Exuro
07-20-2003, 05:22 PM
I think that the problem has to do with the fact that originally you had a Button element to click, and you're changing it to a Submit element (the image). You just need to make a couple chages to your code:
change <form name=login> to:
<form name="login" onsubmit="Login(this);return false;">
change <input type=button value="Login!" onClick="Login(this.form)" name="button"> to:
<input type="image" src="submit.gif" name="button">
And that should do it, hopefully... Hope that helped!
mikec2003
07-20-2003, 05:28 PM
That worked like a charm! Awesome, thanks!