open a new browser window without using javascript

B

bushi

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.
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

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.
 
B

bushi

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






- 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
 
M

Mark Rae

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...
 
N

Norman Yuan

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.
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

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.
 
T

Thomas Hansen

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/AllControlsSamples/ChatClient.aspx
(click the "Start Chatting" button")

..t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top