Solved

Display a jpeg image instead of a submit button in a form

Posted on 2004-09-20
10
411 Views
Last Modified: 2008-03-10
Hi, how can the code below be changed so that instead of a button being used to submit the form, a jpeg image is used. Thanks

 <td align="right"><font face="Arial Narrow" size="5"><input type=
 "submit" value="       Search       "></font></td>
</tr>

0
Comment
Question by:OsdNA
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 30 total points
ID: 12106623
<td align="right"><input type="image" src="somejpeg.jpg" onClick="this.form.submit();" /></td>
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12106651
Hey, Roonaan should get the points for this, I'm just pointing out something that's been bugging me a bit. I've seen a lot of people use onClick and it's perfect fine and works like a charm but people should really get in the habit of using onclick instead of onClick or onmouseout instead of onMouseOut because believe it or not, XHTML actually requires all lowercase. (Don't pay attention to this and take it personally, I'm just letting out tons of pent out anger from the day)
0
 
LVL 49

Expert Comment

by:Roonaan
ID: 12106684
Zyloch, I'm a bit ashamed. I should've know this, last week when I was trying to xhtml-validator some subsite. *roonaan slams his head against ten tons of concrete*. Stupid not to think of that. I just changed the doctype to 4.01.

Thx to have someone with a clear vision on things. Quite the wakeupcall I needed!

damn.

*mumbles along*

-r-

0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12106725
Heh, wasn't really aimed at you, but it's a good "little" thing to know

Regards...
0
 

Author Comment

by:OsdNA
ID: 12106753
Thanks, how can I amend the size of the image?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

Expert Comment

by:Roonaan
ID: 12106760
No I just felt stupid for not realizing this could be the cause for my afternoon trying to figure out why my site wouldn't validate.

You know that feeling when you waist a lot of time not being succesful in finishing things and then a week after, a gigant lightning strikes you, bringing clearvoiance etc.

This is one of those situations. And I'm glad it's finaly here, because hell no i aint forgetting this for a while, which is a very good thing!

-r-
0
 
LVL 36

Assisted Solution

by:Zyloch
Zyloch earned 20 total points
ID: 12106765
You could either use someting like this:

<input type="image" src="hi.gif" width="200" height="200">

or

<input type="image" src="hi.gif" style="width:200px;height:200px;">
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12106773
OsdNA, I hope you don't mind if we're slightly conversational and off topic in your post, mainly my fault.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 12107130
Actually the onclick is unnecessary.  type="image" has exactly the same behaviour as type="submit" which is to submit the form when it is clicked.  Good point Zyloch.  I let you promote that one while Sean and I continue the fight to end the use of tables for layout.:^)

Cd&
0
 

Author Comment

by:OsdNA
ID: 12110401

Thanks for all the help guys :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now