|
-
Jun 6th, 2001, 05:22 AM
#1
Thread Starter
Hyperactive Member
Urgent - please help....buttons!!
Hello,
I have a website using buttons to add products to a shopping basket.
I now want to replace the normal, dull buttons with an image, but cannot get it to work.
This is the buttons code....(using the normal button)
When clicking on the button it calls some Jscript sending 2 variables to the function!!
Code:
<input type="button" value="Add ->"
onClick="copySelected(oLastCombo,this.form.select2)"
style="font-family: monospace; font-size: 8pt">
This is what I tried.......(using an image)
Code:
<img src="file:///C:/New/images/add.gif"
onClick="copySelected(oLastCombo,this.form.select2)" width="94" height="21"
alt="add.gif (463 bytes)">
I get this error...
"this.form.select2 is not an object" when using the image as a button.
PLEASE HELP.
Thanks
T
-
Jun 6th, 2001, 05:55 AM
#2
-
Jun 6th, 2001, 11:23 AM
#3
Frenzied Member
Yea.. don't use File://. It will look on the user's C drive.
You have the right idea though..
The this you have there I believe refers to the image not the document that you are trying to access. Try this:
Code:
<img src="images/add.gif"
onClick="copySelected(oLastCombo,document.form.select2)" width="94" height="21"
alt="add.gif (463 bytes)">
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jun 7th, 2001, 12:30 AM
#4
Thread Starter
Hyperactive Member
Thanks Guys, I got it going!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|