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

Making ONCLICK behavior look like hyperlink

Status
Not open for further replies.

plantfinder

Technical User
Sep 27, 2002
64
0
0
US
I have an onclick behavior that opens a popup window, however I cannot find a way to make the the text "View Larger" that triggers the behavior to look like a hyperlink, since there is no actual link involved. Can some one help please?


Thanks
 
Why not use a real hyperlink then. You can give the hyperlink the Onclick behavior, and at least that would be semantically correct. Instead of using a static element to produce a pop up, and then trying to alter its behavior. Which will end up being a mess and most likely be unreliable across different browser.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks,

But then if I link to the actual image, the target would have to be set to something so wouldn't a click on the hyperlink bring up the file that is referenced in the pop up ONCLICK as a browser page rather than or in addition to the POPUP actually showing up? I guess I'm asking how would I creatge a Hyperlink ti nowhere?

 
Set the hyperlink's target address to "#"

Code:
<a href="#" Onclick="...">

The "#" is nothing so will stay in the same page, and will execute the Onlick event.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top