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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick event

Status
Not open for further replies.

at51178

Technical User
Mar 25, 2002
587
US
Hey GUys
I am new to javascript
and I need help in writing an onclick event to open up a hyper link the following code is part of a script that I am using and i would like to had a function where when you click on a link it will open this is just one line of the code. With in this line of code there is an onclick Event I would like to have it set up so that when you click on this link it will take me to cnet.com please let me know if you can help or not or if you need the whole script. Thank you




html+='<TR><TD STYLE=&quot;border:1pt solid #CCCCCC&quot; ID=&quot;i10&quot; ONMOUSEOVER=&quot;document.all.i10.style.background=\'#CFD6E8\';document.all.i10.style.border=\'1pt solid #737B92\';&quot; ONMOUSEOUT=&quot;document.all.i10.style.background=\'#CCCCCC\';document.all.i10.style.border=\'1pt solid #CCCCCC\';&quot; ONCLICK=&quot;window.location=&quot; SRC=&quot;menuzoom.gif&quot; WIDTH=&quot;12&quot; HEIGHT=&quot;12&quot; BORDER=&quot;0&quot; HSPACE=&quot;0&quot; VSPACE=&quot;0&quot; ALIGN=&quot;absmiddle&quot;>&nbsp;Link1</TD></TR>';
 
Sorry that didn't work
here is a link of another thread where I posted the question but didn't get an answer if you following this link it will give you the entire script maybe it may help you further or if you know of another way let me know.

Thanks

Here is the link
thread216-441470
 
Hi there

I seem to be in the same position. I want to have a Flash object in a cell but OnClick (or MouseDown) don't work - but MouseOver does. The exiting link will be generated by PHP, so I can't easily code it into the Flash (and the Flash object will be random.)

Code:
<table><tr><td OnClick="window.open('[URL unfurl="true"]http://www.tek-tips.com')">[/URL]
<object>FLASH</object>
</td></tr></table>

One thought I had was trigging OnMouseOver to start a function which "captures" the next click and opens the new window - and OnMouseOut would disable the function.

If anyone has any ideas they would be appreciated.

Cheers
Tama

I do my sums on fingers and thumbs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top