mystikal1000
asked on
Anyway of creating a new window function within a URL hyperlink?
Is it possible to open a new window via a url hyperlink w/o html code?
I would like this particular link to open in a new window w/o specifying _blank reference, since actual html code won't work. I know you can hold the shift button down when you click a link to get a new window, but can you add something to the link itself?
Http:\\google.com
I would like this particular link to open in a new window w/o specifying _blank reference, since actual html code won't work. I know you can hold the shift button down when you click a link to get a new window, but can you add something to the link itself?
Http:\\google.com
So you dont want any type of code? I know this can be done with javascript.
ASKER
no code
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your options are specify a target (_blank) which is not XHTML compliant or to use javascript.
option 1:
<a href="somewhere.html" target="_blank">link</a>
option 2:
<script type="text/javascript">
function openLink(e)
{
window.open(e.getAttribute ("href"));
}
</script>
<a href="somewhere.html" onclick="openLink(this);re turn false">link</a>
<a href="somewhereElse.html" onclick="openLink(this);re turn false">link</a>
option 1:
<a href="somewhere.html" target="_blank">link</a>
option 2:
<script type="text/javascript">
function openLink(e)
{
window.open(e.getAttribute
}
</script>
<a href="somewhere.html" onclick="openLink(this);re
<a href="somewhereElse.html" onclick="openLink(this);re