3 Replies - 5375 Views - Last Post: 13 July 2009 - 08:31 PM Rate Topic: -----

#1 excaliber01  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-July 09

How to open a new html page in a New tab in IE7 and firefox

Posted 13 July 2009 - 06:35 PM

I have a project i am working on, I want to be able to make a choice in say a Treeview control, and in the code behind Click event i would like it to open a dynamic page in a new browser tab, My difficulty is that the Response.Redirect("http://xxx") opens it in the same browser tab that has focus i have tried to add Target=_blank but not certain if this is usable attribute of the response object, and i also believe if it did work it would be more like a pop-up than a new tab. i have searched for more than a week now and have found nothing that works.

Advance Thank you !!!!

Response.Redirect("~\PM\HTMLSched.htm")
(opens the page in the same tab)
'Dim url = "~\PM\HTMLSched.htm"
		  'Response.Write("window.open('" & url & "');" & vbCrLf)

Response.Redirect("""~\PM\HTMLSched.htm"" TARGET=""_blank""")


I know a am making progress, These are all different ways it dont work correctly

This post has been edited by excaliber01: 13 July 2009 - 06:51 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How to open a new html page in a New tab in IE7 and firefox

#2 LoveIsNull  Icon User is offline

  • Recovering D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 646
  • Joined: 10-March 09

Re: How to open a new html page in a New tab in IE7 and firefox

Posted 13 July 2009 - 06:44 PM

What do you have so far?
Please post your code in these tags.
:code:
Was This Post Helpful? 0
  • +
  • -

#3 excaliber01  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-July 09

Re: How to open a new html page in a New tab in IE7 and firefox

Posted 13 July 2009 - 07:00 PM

View PostLoveIsNull, on 13 Jul, 2009 - 05:44 PM, said:

What do you have so far?
Please post your code in these tags.
:code:



i added it to the original post Thank you
Was This Post Helpful? 0
  • +
  • -

#4 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 421
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: How to open a new html page in a New tab in IE7 and firefox

Posted 13 July 2009 - 08:31 PM

Just add the script tags.

Dim url = "~\PM\HTMLSched.htm"
Response.Write("<script>window.open('" & url & "');</script>")

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1