Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object: onclick

Status
Not open for further replies.

furtivevole

Technical User
Jun 21, 2001
84
GB
I have inherited a set of pages each with a piece of readymade code in the format:

<object id=&quot;mIFTW&quot; CLASSID=&quot;clsid:4E330863-6A11-11D0-BFD8-006097237877&quot; HEIGHT=&quot;31&quot;
WIDTH=&quot;88&quot;
CODEBASE=&quot;
I would like to associate an onclick event with this (as one would with say a conventional command button). In other words, when the user clicks the image, an additional piece of vbscript code is fired off.

Unfortunately I can't get any syntax/workarounds/fudges to work. Any suggestions please?

Linnet
 
Have you tried using javascript to accomplish the goal?

I do not have any examples at this moment.

You could have the javascipt accomplish the task or load another page which contains the ASP code you need to have run.

good luck
- carpe diem -
 
There is already a very extensive routine written in vbscript that I would prefer to re-use.

Also, I hadn't explained that this is a file URL (it's an InstallShield download) so the option of loading another page doesn't apply. 8-(

 
well, I'm not sure it it would work, but you might try making that object an anchor, and giving it an href of:

href=&quot;vbscript:functionName();&quot;

so:

<a href=&quot;vbscript:functionName();&quot;>
<object id=&quot;mIFTW&quot; CLASSID=&quot;clsid:4E330863-6A11-11D0-BFD8-006097237877&quot; HEIGHT=&quot;31&quot;
WIDTH=&quot;88&quot;
CODEBASE=&quot;</a>
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top