By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

open a new browser window without using javascript

P: n/a
hi everyone!
i have diplayed my hyperlinks in a iframe.when i redirect
to next page.the next page also open in the same frame,but i want to
open a new browser window,when i click on the link.actually i 'm using
link button control to diplay the hyperlinks.i cant use java script
"window.open()".i need some server side code behind the linkbutton,if
any one knows plz rply soon.

Apr 14 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Without JavaScript your only real solution is to use a hyperlink with the
target attribute set:
<a href="MyPage.aspx?myparm=1" target="_blank">Click Me</a>
Now this doesn't post back the originating page to the server, however in
the above example MyPage.aspx will cause a server page request and you can
pass it querystring parameters, so in many cases this will work to both open
a new window and process server side code.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"bushi" <bu*******@gmail.comwrote in message
news:11**********************@y5g2000hsa.googlegro ups.com...
hi everyone!
i have diplayed my hyperlinks in a iframe.when i redirect
to next page.the next page also open in the same frame,but i want to
open a new browser window,when i click on the link.actually i 'm using
link button control to diplay the hyperlinks.i cant use java script
"window.open()".i need some server side code behind the linkbutton,if
any one knows plz rply soon.
Apr 14 '07 #2

P: n/a
On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
Without JavaScript your only real solution is to use a hyperlink with the
target attribute set:
<a href="MyPage.aspx?myparm=1" target="_blank">Click Me</a>
Now this doesn't post back the originating page to the server, however in
the above example MyPage.aspx will cause a server page request and you can
pass it querystring parameters, so in many cases this will work to both open
a new window and process server side code.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@y5g2000hsa.googlegro ups.com...
hi everyone!
i have diplayed my hyperlinks in a iframe.when i redirect
to next page.the next page also open in the same frame,but i want to
open a new browser window,when i click on the link.actually i 'm using
link button control to diplay the hyperlinks.i cant use java script
"window.open()".i need some server side code behind the linkbutton,if
any one knows plz rply soon.- Hide quoted text -

- Show quoted text -
thanx steve!
but i can't got ur point,i have solved my problem by using the
following code snippet:

Response.Write("<script type='text/
javascript'>detailedresults=window.open('ad2.html' );</script>");

a little bit problem remains.i want to use variable instead of the
hardcoded page address,as above i have used 'ad2.html'.actually i have
to select the value at run time,
as

Response.Write("<script type='text/
javascript'>detailedresults=window.open(page);</script>");

when i use this piece of code,the page is not redirected.i can solve
it by checking the value of page using if conditions and then use the
address of the corresponding page.
but i dont like such type of hardcoding,if u hav any idea other then
mine plz recommend me,i will wait 4 ur rply anxiously

Apr 14 '07 #3

P: n/a
"bushi" <bu*******@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
thanx steve!
but i can't got ur point,
Steve's point is that he was actually trying to answer your question i.e.
how to open a new browser window without using JavaScript - that's what you
said you were looking for...

i have solved my problem by using the
following code snippet:

Response.Write("<script type='text/
javascript'>detailedresults=window.open('ad2.html' );</script>");
There's the problem... You ask for help in opening a new browser window
without using JavaScript (note the title of this thread which you started),
and then you say that you have solved it by using JavaScript...
Apr 14 '07 #4

P: n/a
The new window you are trying to open by streaming javascript from server to
browser will be treated as "bad or unwanted" pop-ups and would be blocked by
most browser by default.

Only client-side started new window due to user's explicit action(cliking)
on client-side is considered "good" pop-up. So, you better follow Steve's
suggestion if you really hate "javascript", or just use client-side
javascript, there is nothing wrong to use it, and you used it in your found
solution anyway.

"bushi" <bu*******@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
>Without JavaScript your only real solution is to use a hyperlink with the
target attribute set:
<a href="MyPage.aspx?myparm=1" target="_blank">Click Me</a>
Now this doesn't post back the originating page to the server, however in
the above example MyPage.aspx will cause a server page request and you
can
pass it querystring parameters, so in many cases this will work to both
open
a new window and process server side code.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@y5g2000hsa.googlegr oups.com...
hi everyone!
i have diplayed my hyperlinks in a iframe.when i redirect
to next page.the next page also open in the same frame,but i want to
open a new browser window,when i click on the link.actually i 'm using
link button control to diplay the hyperlinks.i cant use java script
"window.open()".i need some server side code behind the linkbutton,if
any one knows plz rply soon.- Hide quoted text -

- Show quoted text -

thanx steve!
but i can't got ur point,i have solved my problem by using the
following code snippet:

Response.Write("<script type='text/
javascript'>detailedresults=window.open('ad2.html' );</script>");

a little bit problem remains.i want to use variable instead of the
hardcoded page address,as above i have used 'ad2.html'.actually i have
to select the value at run time,
as

Response.Write("<script type='text/
javascript'>detailedresults=window.open(page);</script>");

when i use this piece of code,the page is not redirected.i can solve
it by checking the value of page using if conditions and then use the
address of the corresponding page.
but i dont like such type of hardcoding,if u hav any idea other then
mine plz recommend me,i will wait 4 ur rply anxiously

Apr 14 '07 #5

P: n/a
I've never seen anyone contradict themself so many times with just two
posts.
You explicitly said you need a solution that doesn't just JavaScript or the
window.open method.
Then you ignore my advice that met your requirements and you instead use the
JavaScript window.open method.
But, hey, whatever you're happy with dude.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"bushi" <bu*******@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
>Without JavaScript your only real solution is to use a hyperlink with the
target attribute set:
<a href="MyPage.aspx?myparm=1" target="_blank">Click Me</a>
Now this doesn't post back the originating page to the server, however in
the above example MyPage.aspx will cause a server page request and you
can
pass it querystring parameters, so in many cases this will work to both
open
a new window and process server side code.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@y5g2000hsa.googlegr oups.com...
hi everyone!
i have diplayed my hyperlinks in a iframe.when i redirect
to next page.the next page also open in the same frame,but i want to
open a new browser window,when i click on the link.actually i 'm using
link button control to diplay the hyperlinks.i cant use java script
"window.open()".i need some server side code behind the linkbutton,if
any one knows plz rply soon.- Hide quoted text -

- Show quoted text -

thanx steve!
but i can't got ur point,i have solved my problem by using the
following code snippet:

Response.Write("<script type='text/
javascript'>detailedresults=window.open('ad2.html' );</script>");

a little bit problem remains.i want to use variable instead of the
hardcoded page address,as above i have used 'ad2.html'.actually i have
to select the value at run time,
as

Response.Write("<script type='text/
javascript'>detailedresults=window.open(page);</script>");

when i use this piece of code,the page is not redirected.i can solve
it by checking the value of page using if conditions and then use the
address of the corresponding page.
but i dont like such type of hardcoding,if u hav any idea other then
mine plz recommend me,i will wait 4 ur rply anxiously
Apr 14 '07 #6

P: n/a
On Apr 15, 12:49 am, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
I've never seen anyone contradict themself so many times with just two
posts.
You explicitly said you need a solution that doesn't just JavaScript or the
window.open method.
Then you ignore my advice that met your requirements and you instead use the
JavaScript window.open method.
When we're at it, that's no window, THIS is a window:
http://ajaxwidgets.com/AllControlsSa...hatClient.aspx
(click the "Start Chatting" button")

..t

Apr 18 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.