Open a new browser window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know that I can redirect my user to another url with Response.Redirect, but
is there a way to open another browser, preferrably one with the menu and
toolbars not visible?

In other words, I'm looking to get as close to a modal dialog in a browser
based app as I can. I know that this has been solved. I've seen it done. It's
just that, faced with the massive amount of documentation I have no idea
where to look..
 
Rik,

Check the documentation for the open method on the window object in
javascript. This will be called from javascript that is called on the
client side (due to some event). In the open method, you can specify how
the new browser window will appear (with toolbars, etc, etc). It should be
noted that some of these options are no longer valid in Windows XP SP2, due
to security concerns.

Hope this helps.
 
Rik,

Here's a reference site where you can find the syntax for the
window.open() JavaScript method:

http://www.javascripter.net/faq/openinga.htm

Also, if you intend to open the new window from an ASP.NET server
control, you'll need to reference the JavaScript function in the
Attributes collection of the server control in order to make it fire
correctly from the client-side script.

HTH

Thanks,
Denny Boynton
 
This was great, and worked very well. Now I have another problem. I have a
server side button that needs to do some preperation and afterwards, if
everything goes well, open a new browser with a specific url.

Your responses showed me how to execute javascript from a server side
control, adding the javascript to the attributes. That addressed the problem
that I had. Now I have another. I need to open the browser window AFTER the
code behind event is finished, and even then only in the case that the event
finished successfully.

So, is there any way to accomplish this?
 

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

Back
Top