Solved

Anyway of creating a new window function within a URL hyperlink?

Posted on 2009-03-29
4
172 Views
Last Modified: 2012-05-06
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
0
Comment
Question by:mystikal1000
  • 2
4 Comments
 
LVL 6

Expert Comment

by:ITHelper80
Comment Utility
So you dont want any type of code? I know this can be done with javascript.
0
 
LVL 1

Author Comment

by:mystikal1000
Comment Utility
no code
0
 
LVL 6

Accepted Solution

by:
ITHelper80 earned 500 total points
Comment Utility
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
 
LVL 12

Expert Comment

by:alien109
Comment Utility
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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now