Solved

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

Posted on 2004-09-29
2
300 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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

9 Experts available now in Live!

Get 1:1 Help Now