how do I popup a window w/o using client-side script

  • Thread starter Thread starter Shawn Mason
  • Start date Start date
S

Shawn Mason

I have a requirment to utilize popup windows for edit/add screens from
datagrids. I have accomplished this using client-side javascript. I have
been told this is not acceptable and I must do it another way to avoid the
possiblity that someones popup blocker may make the program not function
correctly.

I have no idea how to do this another way. Any ideas?

Thanks,

Shawn
 
You can do it with a plain HTML link such as this:
<a href='mypage.aspx' target='_new'>click here</a>
 
We use window.open statements for our data entry screens.
We used to use hidden DIVs that contained IFRAMEs (which
did work fine in IE), but moved to popup windows because
they looked much nicer and could be repositioned anywhere
on the screen.

You can try the window.showModalDialog or
window.showModelessDialog functions, but I'm not sure if
pop-up blockers block those or not.

- Dave Davidson, MCP

(E-mail address is a "no-spam" account - other than my MCP
I have no association with Microsoft.)
 
I am not so sure this can be done with out using some kind of client side
operation. Because the server doesn't have control over the client so the
server cannot force a window to pop up. It can put script there for the
client to interpret but ultimatly it's the clients call on if a pop up will
be allowed or not.

The best method around this is to probably use DHMTL that shows and hides
windows in the back ground. Much like those stupid drop down ads on Yahoo.
Just telling the user to click here to open a window.

As a side not Pop Up blockers up till this point really only block pop ups
that are un requested so if a user clicks a link to launch a window that is
generally excepted a valid pop up by most if not all pop up blockers.
 
They'll only block it if it's done without an action taken by the user
(like in an onClick event). If you have, say, a button that adds a
literal control to the form that has a window.open, it'll get blocked by
any of the pop-up blockers.
 
Back
Top