View Full Version : Replace type="image" over type="submit"
mikster
07-29-2011, 05:28 AM
Hi,
I tried to replace my submit button by replacing type="image" over "submit" and the form doesn't work properly. Is there something Im missing out? If i wanted to replace my submit button with an image is there a special way to do it for forms?? Any help is appreciated thanks. below is the code btw
<input type="image" name="signin" value="Login" src="/images/login_button.gif">
jscheuer1
07-29-2011, 05:57 AM
Works fine here:
<form action="#">
<input type="text" name="bob" value="Sid">
<input type="image" name="signin" value="Login" src="soft-enamel.gif">
</form>
If you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
mikster
08-24-2011, 12:59 AM
Hi my code looks like this
<input type="hidden" name="username" value="<?=$_SESSION['member']?>" /><br>
<input type="image" name="Submit" value="Add New Album" src="/images/addalbum.gif" border="0" />
is there any reason why from the code above making it not work properly?? I have a feel the whole script itself is causing it to malfunction because my site is a members based site and there are other functions involved. I was just wondering if by any chance maybe I messed up the two lines above. Thanks.
Works fine here:
<form action="#">
<input type="text" name="bob" value="Sid">
<input type="image" name="signin" value="Login" src="soft-enamel.gif">
</form>
If you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
jscheuer1
08-24-2011, 03:56 AM
That's not a form. If it's part of a form, it could be OK, but there could be many other factors. But this works:
<form action="#">
<input type="hidden" name="bob" value="Sid">
<input type="image" name="signin" value="Login" src="soft-enamel.gif">
</form>
I can't diagnose it further from just those two lines.
As I said before, if you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
If it's members only, give me a guest membership. You can PM me the name and password.
fastsol1
08-25-2011, 03:06 AM
Did the form work before you changed the input to a image? If it did, is it not working in IE but works in firefox and others? IE doesn't look at a submit button the same if it's a image. Are you checking if it was submitted with something like this -
if(isset($_POST['submit']))
If yes, try this
if(isset($_POST['submit']) || isset($_POST['submit_x']))
I have had to use this before for stupid IE. IE wants to read the image with coordinates cause it sees the image.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.