Opening a new window

M

Martin

I'm creating a page that contains several VML elements. i want to make
it so that when the user clicks on a VML item, a separate window will
pop up to display some information (a separate page will be served).

I know how to use "window.open" in an "onClick" event to open a new
window and specify various factors (width, height, scrollbars, etc.).
The problem is, the VML elements do not have an onClick event. What
they DO have is "href" and "target". Using these, I can get the
separate window to appear and display the page - but, I can't figure
out how to control the appearence of the new window (width, height,
scrollbars, etc.).

Is there a way to specify these parameters?

Or, alternatively, is there some way I could set these by running an
"onLoad=" script in the new window?

Suggestions?

Thanks.
 
W

Webcastmaker

I'm creating a page that contains several VML elements. i want to make
it so that when the user clicks on a VML item, a separate window will
pop up to display some information (a separate page will be served).

Prepare for the wrath of pop-up window haters.... ;-}
I know how to use "window.open"...
Is there a way to specify these parameters?

Use target="_blank" in your link. Then the page that it opens have
the following:

var Holder = window.open('page.html','name','options');
window.opener = null;
self.close();

This will launch the new sized window and close the one opened with
target="_blank". It will also re-use the sized window every time so
the user does not have a million of these opened. An example of this
can be seen on all of our demos.
 
D

Dylan Parry

Webcastmaker said:
This will launch the new sized window and close the one opened with
target="_blank".

Does this not bring up a dialogue in IE saying something about a
JavaScript trying to close a Window that wasn't opened with JavaScript?
 
W

Webcastmaker

Does this not bring up a dialogue in IE saying something about a
JavaScript trying to close a Window that wasn't opened with JavaScript?

Nope, try it one of the demos and see.
 
M

Martin

OK, thanks - that worked as you it would.

Would you happen to know if there's some way to keep the "_blank"
window hidden such that it does not become visible at all? Maybe
"pop-under"?

Thanks again.
 
W

Webcastmaker

OK, thanks - that worked as you it would.
Would you happen to know if there's some way to keep the "_blank"
window hidden such that it does not become visible at all? Maybe
"pop-under"?

Nope not that I know of. We have not seen that momentary window an
issue as it is appearing to the user that the Pop-up is simply
resizing itself. But then, our reason to use it is a web
application, rather than a pop up with a website in it.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top