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
LVL 1
mystikal1000Asked:
Who is Participating?
 
ITHelper80Connect With a Mentor Commented:
I dont think you can without some kind of client side script. IF they are clicking on a hyperlink why couldnt you use some type of code?
0
 
ITHelper80Commented:
So you dont want any type of code? I know this can be done with javascript.
0
 
mystikal1000Author Commented:
no code
0
 
alien109Commented:
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);return false">link</a>

<a href="somewhereElse.html" onclick="openLink(this);return false">link</a>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.