Page 1 of 1

Converting image to work as button

Posted: Sun Sep 24, 2006 12:43 pm
by ashrafzia
Can anyone help me that how to convert an image to work as button.
Actually my question involve different issues.
I am making an online examination system in which in the admin area i have images instead of buttons for good look. Lets say i have an image Student Now when the student image (which will work as button) is clicked i should be proceeded to the same page, with these different options.
Add Student
Delete Student
Edit Student
Update Student
Plz clarify me that in case of form buttons we make a hidden filed named let's say (h1) and then make its value to true and when that button is clicked, in the action of that form we provide the same file name, let's say student.php and then we have an isset() function and we check that either h1 form is submitted or other and then according to that form we write code.
So in case of images how can we handle such things.
I hope you get what i want to say
Thanx for any help in advance. :oops:

Posted: Mon Sep 25, 2006 10:37 am
by pickle
You can make an image behave like a button using the

Code: Select all

<input type = "image" src = "path/to/image/file" name = 'blah'>
syntax. This will cause the input element to behave like a submit button.

Posted: Mon Sep 25, 2006 12:08 pm
by ashrafzia
pickle wrote:You can make an image behave like a button using the

Code: Select all

<input type = "image" src = "path/to/image/file" name = 'blah'>
syntax. This will cause the input element to behave like a submit button.
Fine Done it. Now how can i convert it to a rollover ?

Posted: Mon Sep 25, 2006 12:15 pm
by pickle
For a form button? You'll have to use Javascript. There are scripts & tutorials all over the internet on how to do this.

Posted: Sat Dec 09, 2006 8:45 am
by neel_basu

Code: Select all

<input type="button" value="Button" name="B3" style="border: 1px solid #FFFFFF; background-image: url('background_image_location.jpg')">
Change The #FFFFFF To The Background Color Of Your Page
And Change The background_image_location.jpg To The Location Of Your Image File

feyd | color and 24 pixel font isn't needed...

Posted: Sat Dec 09, 2006 9:31 am
by RobertGonzalez
ashrafzia wrote:
pickle wrote:You can make an image behave like a button using the

Code: Select all

<input type = "image" src = "path/to/image/file" name = 'blah'>
syntax. This will cause the input element to behave like a submit button.
Fine Done it. Now how can i convert it to a rollover ?
You can use the :hover psuedo class, but it will not work in IE6 and below.