Perfect Popup

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

Hi, Can anyone plz tell me a code that will initiate a popup window with height, and width to match it's content?
thanks in advance.

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

Hi,

This is a simple javascript popup that resizes the window, however if they have popups and new windows in IE set to open in a new tab instead it won't resize.

Quote: ((put between ))
<script language="JavaScript" type="text/javascript" src="popup.js"></script>

((put in file called popup.js))
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=276,height=239,left = 511,top = 476');");
}

((place this where you want the link - remove the space below before popUp))
TEXT OR IMAGE HERE

Just change the width and height in the popup.js file to what you want and edit all the text in capitals.

If you want to see it in action click on our link, click on hosting and then click on one of the info icons next to the list of resources.

Regards, Steve

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

ahh, thank you, i neede this, google dint help me much.
thanks again.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.