Solved

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

Posted on 2009-03-29
4
173 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
ID: 24013965
So you dont want any type of code? I know this can be done with javascript.
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 24013982
no code
0
 
LVL 6

Accepted Solution

by:
ITHelper80 earned 500 total points
ID: 24014024
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
ID: 24014228
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spacing 5 56
wordpress url rewriting plugin 5 42
ESEUTIL Stopped Working Need a new copy for 2003 Exchange. 11 45
html coding on my Tumblr blog 1 34
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Learn about cloud computing and its benefits for small business owners.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

932 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

17 Experts available now in Live!

Get 1:1 Help Now