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!

Popup link without header code?

Status
Not open for further replies.

buddyrich2

Technical User
Apr 12, 2006
87
US
I want to distribute graphics+code for my clients to put on their own websites which cause a popup window to come up but I don't want them to have to include any code in the header. Is it possible to include all the (javascript)code right in the href link to make the popup page happen?
 
Yes. Something like this would also offer a fallback to users without JS as well:

Code:
<a href="[URL unfurl="true"]http://www.google.co.uk/"[/URL] onclick="window.open('[URL unfurl="true"]http://www.google.co.uk/',[/URL] '', ''); return(false);">Click me!</a>

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top