|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
||||
|
||||
|
changing regular submit button for image
hey how do i change my basic submit button for an image i have created + is there a way to avoid using javascript?
|
|
#2
|
|||
|
|||
|
RE: changing regular submit button for image
<input type="image" border=0 name="NAME" src="name.gif">
Creates a Submit button using an image |
|
#3
|
|||
|
|||
|
RE: changing regular submit button for image
DorkRawk!
You've mistaken a bit. That will send the user back to current page, but will not submit the data in a form like a submit button. Cannot avoid javascript if you want to submit a form using image.... |
|
#4
|
||||
|
||||
|
RE: changing regular submit button for image
ok thanks for the advice.
|
|
#5
|
|||
|
|||
|
RE: changing regular submit button for image
its REAL easy to do with javascript though. A simple OnClick="document.formname.submit();" and your off to the races!
|
|
#6
|
||||
|
||||
|
RE: changing regular submit button for image
ok becuase those standard submit buttons look ugly dont they. Thanks nawjei for telling me the javascript for it.
|
|
#7
|
|||
|
|||
|
RE: changing regular submit button for image
But what if the user has disabled javascript in thier browsers? They cannot ever submit the form then... it is too risky in my point of view... specially to use javascript in a submit button
That's why I always prefer harmless stylesheets to make submit buttons handsome!! |
|
#8
|
|||
|
|||
|
RE: changing regular submit button for image
You know, Ive seen a lot of posts saying, "What if they disable javascript". While I completely agree to webpages being able to be seen by all, if you disable javascript in your browser, you have more things to worry about. A good portion of websites out there on the web use javascript to drive some portion of the website. Gotta make that jump sometime
|
|
#9
|
||||
|
||||
|
RE: changing regular submit button for image
yeh almost 90% of webusers have javascript enabled and some of them dont even know its there so dont know they can disable it even if they wanted too. The same applies to cookies.
|
|
#10
|
|||
|
|||
|
RE: changing regular submit button for image
Code:
.buttons {
font-family: "Verdana";
font-size: 11px;
color: "#FFFFFF";
font-weight:bold;
background-color: "#FF0000";
border: 1px ridge #245979;
}
|
|
#11
|
||||
|
||||
|
RE: changing regular submit button for image
hmmm im trying to decide the best way stylesheets or javascript. Ill probably pick stylesheets or if i pick javascript i would use the <noscript> tag to display a different form. Anway thanks for your help.
|
|
#12
|
|||
|
|||
|
RE: changing regular submit button for image
codeKadiya: what are you talking about?
i mean, i agree that css is the way to go, but <input type=image /> is a valid replacement for a submit button, and there is no wrong in using it. i mean, it submits the form. where did you get the idea that it doesn't? |
|
#13
|
|||
|
|||
|
RE: RE: changing regular submit button for image
zombie,
I told DorkRawk that it does not make a submit button when you just use a script like this one below. He got to use onClick='..' and bit of javascript to make it a submit button, not only the image. If he use only the image without javascript it will not submit the form. Quote:
|
|
#14
|
|||
|
|||
|
RE: changing regular submit button for image
i repeat, that is SO NOT TRUE!
put it in a form, set the action attr of the form, put it on a page, anc click it.. see what happens! or just copy/paste this: Code:
<form action="test.php"> <input type="image" name="foo" src="button.jpg" /> </form> and click it.. as i said it before, if you state something to be true, please first verify it... |
|
#15
|
||||
|
||||
|
RE: changing regular submit button for image
zombie is right about this, <input type="image" ...> is a substitute for the submit button. WebMonkey's HTML cheatsheet agrees too.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > changing regular submit button for image |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|