2 Replies - 1754 Views - Last Post: 27 April 2002 - 07:01 AM

#1 jhsando  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 87
  • Joined: 02-November 01

Javascript for a pop up window

Posted 26 April 2002 - 08:35 PM

anyone know the javascript for a pop up window?
Is This A Good Question/Topic? 0
  • +

Replies To: Javascript for a pop up window

#2 SoLi  Icon User is offline

  • andydust.com

Reputation: 41
  • View blog
  • Posts: 1,438
  • Joined: 27-January 02

Re: Javascript for a pop up window

Posted 27 April 2002 - 01:22 AM

http://javascript.in...pup-window.html

:)

Was This Post Helpful? 0
  • +
  • -

#3 skrilla monkey  Icon User is offline

  • goat.face

Reputation: 0
  • View blog
  • Posts: 838
  • Joined: 14-January 02

Re: Javascript for a pop up window

Posted 27 April 2002 - 07:01 AM

that will (probably) spit out a huge amount of unnecessary code, including features you *might* not use. here ya go:
<script language="javascript" type="text/javascript">
function openWindow(url,name,features) {
    myWin = window.open(url, name, features);
}
</script>


now to use this function, on the <a> link you want to open the window, use this code: <a href="#" onclick="openWindow('http://litescript.ekostudios.com','thisWindow','menubar=no,scrollbars=no');">the link</a>

and there you go :) you can add features like fullscreen=yes, etc. there are MANY MANY features. I tested the code, it works great, and is very simple :) hope i helped you out, bro! :biggrin:

Digit: not trying to degrade you here, I just am majorly against un-needed extra code, which is what those kind of sites spit out (usually) :)

-pete
PS: if you want to modify that window later, you can use the name that you gave it before the window.open() command. like this:

myWin.resizeTo(0,0);
-or-
myWin.moveTo(43,290);


there are many possibilities ;) thats what makes JS great! :biggrin:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1