Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2004, 11:58 AM
Authorized User
 
Join Date: Oct 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default image as button

i have a submit button with the following code.
<input type="submit" name="btnadd" value="Add">

However, now i want to use an image as a button. How am i going to code it?

 
Old February 11th, 2004, 12:03 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

If you want to use an image as a submit button then use an input of type image. For a normal button image, i.e. one that runs code when clicked have a normal img element with an onclick set to run a function.

--

Joe
 
Old February 11th, 2004, 03:55 PM
Authorized User
 
Join Date: Oct 2003
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ex:

<INPUT TYPE="image" src="yourSubmitButtonHere.gif" border=0>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Image button onclick msbsam ASP.NET 2.0 Basics 0 December 30th, 2006 04:47 AM
Dynamic image button Angel6784 ASP.NET 2.0 Basics 2 August 2nd, 2006 01:25 PM
Make a image button as default submit button toshi ASP.NET 1.0 and 1.1 Basics 1 June 1st, 2006 05:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.