...

View Full Version : clickin on a link and openin it on new page



uniquity
01-17-2004, 07:26 AM
does anybdoy no the script so that when u click on a link, the link opens up in a different page?

me'
01-17-2004, 10:39 AM
*posted by accident, sorry*

me'
01-17-2004, 10:40 AM
Yes, but why would you want to do it? Reasons against: The code isn't xhtml 1.1 compliant
It annoys people very much
A lot of browsers will block it if you try, anyway.Here's the code, anyway (theoretically):
<a href="page.html" target="_new">Link Text</a>Alternatively:
<a href="#"
onclick="
window.open(
'page.html',
'pageTitle',
'width=360, height=400, toolbar=no, resizable=yes, scrollbars=yes, top=10, left=10')">
Link Text
</a>

Paul Jr
01-17-2004, 07:13 PM
To build on what me' posted...


<a href="index.html" onclick=" window.open(this.href, 'pageTitle', 'width=360, height=400, toolbar=no, resizable=yes,
scrollbars=yes, top=10, left=10'); return false;"> Link Text </a>

To make sure users without JS can still access the page.

uniquity
01-18-2004, 03:51 PM
thanks so much. totally solved my problem.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum