pop up window

A

Andy G

I have an application that once you login it creates a new window using
script (see below). This window is the window the client needs to use to do
their work (don't ask why we need a window to pop up, it's a client
request). The obvious problem...POP UP BLOCKERS! I love them when I'm on
the web, but not when I'm creating an application where we need a new window
to come up client side. Any suggestions....
Thanks smart people
Dim scriptString As String

scriptString += "<script language=javascript>"

scriptString +=
"window.open('BRM/Assessment/home.aspx','Assessments','toolbar=no,
scrollbars=yes, height=800,width=840 top=100, left=200');"

scriptString += "</script>"

Me.RegisterStartupScript("Startup", scriptString)
 
K

Kevin Spencer

You can also open a Popup window by using a hyperlink with the target
attribute set to "_blank". You just have no control over it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
S

Steve C. Orr [MVP, MCSD]

Yes, Kevin's approach might work well for you.

<a href='whatever.aspx' target='_blank'>click me</a>

Most popup blockers will allow popup windows to appear if they are the
direct result of a click on an href like this.
 
J

James Thomas

It's a simple matter to enable pop-ups for a specific domain. If your
clients want this functionality, they should be willing to do so.

Also, you can bypass popup blockers by making the popups the result of
an action by the user, rather than automatically but that probably
doesn't meet their needs.

James
 
J

J

So, how about Response.Redirect("index2.aspx")? How can I open another window
using Response.Redirect()?
 
K

Kevin Spencer

So, how about Response.Redirect("index2.aspx")? How can I open another
window
using Response.Redirect()?

You can't.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
A

Andy G

I'm sorry, but where would you put...

<a href='whatever.aspx' target='_blank'>click me</a>

Inside the <body> tag? In the HTML portion inside my button? In the
code behind page?

Thanks
 
G

Guest

You can actually open a new window with response.redirect. You just need to
add in a script like so.

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

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top