Solved

I am using a LinkButton and want to navigate to another page that opens with blank target

Posted on 2004-09-29
2
302 Views
Last Modified: 2010-05-18
I am using a LinkButton and want to navigate to another page that opens with blank target (target="_blank")

I have used response.redirect(URL) to navigate to the page but the LinkButton wont accept target="_blank" property.

I am using a linkbutton because I need other code to respond to the click event.

If there is an easier way to navigate to a page, respond to the click event and have the page you navigate to open up in a target="_blank" setup then I'll be delighted to hear about it.

Thanks in advance

Paul G
0
Comment
Question by:pgilfeather
2 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12178711
not sure what you mean by a link button, but this javascript may work for you

onClick="window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')"

put it in the place of your target=...
Rockman
0
 
LVL 14

Accepted Solution

by:
Esopo earned 500 total points
ID: 12182337
I don't understand your LinkButton concept.

A link that open in another page looks like this:
<a href="#" target="_blank">Click me!</a>

Somehow I sense you are past this ;)



If you want a buton to open a link in a different document you can use something like this:


<input type="button" name="Button" value="Button" onClick="window.open('http://www.google.com', '_blank')">


This is similar to Rockman's code but I don't use the size settings so the window will be as "normal" as possible. You can do a fair amount of things with this new window you create, check out this link:

http://www.javascripter.net/faq/openinga.htm


Be ware that this is the same way pop-ups are opened, so pop-up blockers will block your new window.

Best regards,

Esopo.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

23 Experts available now in Live!

Get 1:1 Help Now