Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
kris66 #1
trouble with replacing submit button with image
I have a simple login form and one submit button. I have replaced the standard
grey button with a costum made button using the appropiate Form>Image Field.
The problem is that it wont work. It just seem to reset the text fields. Here
is the code:
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==274514501128904340000&&passcode==1269 869750325)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".html"}
else{
alert("password/username combination wrong")}
}
</script>
<form name="password1">
<span class="style57">username: </span>
<input name="username2" type="text" size="15">
<br>
<span class="style57">password: </span>
<input name="password2" type="password" size="15">
<input name="submit" type="image" onclick="submitentry()"
value="Submit" src="img/submit.gif" />
</label>
<label></label>
</form>
Now if I rename type="image" back to "type="button" then all is ok and it
work. Where am I going worng here?
Thanks
Kris
kris66 Guest
-
Image for Submit Button
hey everyone. i'n building a for in which the data from the fields is inserted into a database table. i'm using an image for my submit button, but... -
Can i use a self made image instead of a submit button?
hi, i want to use a submit button i have created in fireworks. but im having some difficulty getting it to submit data in a form! Can this be... -
Replacing Submit Button with text link?
Is there a way to accomplish the same thing as <input type='submit' value='Submit'> using an anchor tag? -
Submit Button is now an Image
Hi, I have a form with input fields and a submit button as following :(don't focus on mistypings if any) <FORM action=page.asp method=post>... -
[PHP] using submit button and PHP-HELP
thanx for your help, Ive got flu and all these small things seem to be escaping my eyes. I just want to ask you a small question: If i want this...



Reply With Quote

