Solved

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

Posted on 2009-03-29
4
175 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't get second accordion on page to work 2 13
Head to not include on scroll 4 23
Ouput in html in powershell 2 21
message Alert on an empty search 10 22
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

830 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