Quantcast

Jump to content

» «
Photo

Automatic Popups.

4 replies to this topic
SupremeBeing
  • SupremeBeing

    Gangsta

  • Members
  • Joined: 05 Jan 2003

#1

Posted 16 May 2005 - 03:37 PM

Hiya, basically im trying to code out some javascript which automatically opens a fixed-size page when another page is opened.

Example, Home.html opens mediaplayer.html (100x100) automaticlly.

I completly suck at java, and looked for a pre-made script but i cant seem to find any - or didnt understand them. Could anyone help me out?

Thanks In Advance.


EmSixTeen
  • EmSixTeen

    yer ma's got athlete's foot!

  • $outh $ide Hoodz
  • Joined: 13 Apr 2002

#2

Posted 16 May 2005 - 03:47 PM

Anybody with any sense will have a pop-up blocker, so I don't recommend it.

SupremeBeing
  • SupremeBeing

    Gangsta

  • Members
  • Joined: 05 Jan 2003

#3

Posted 16 May 2005 - 04:06 PM

Yeah ive thought about that, but i still want to do it because my school doesnt use pop-up blockers. But for pop-up blocker users ive put a link so then can get to the page via that.

Svip
  • Svip

    I eat babies

  • Members
  • Joined: 12 Nov 2001

#4

Posted 16 May 2005 - 05:22 PM

QUOTE (SupremeBeing @ May 16 2005, 18:06)
Yeah ive thought about that, but i still want to do it because my school doesnt use pop-up blockers. But for pop-up blocker users ive put a link so then can get to the page via that.

Why don't you just do that? People without pop-up blockers will mostly close it.

And it really is bad webdesign. I do know how to do it, but I wont tell you since it's rather useless.

Luke2004
  • Luke2004

    You wanna leave? k. gtfo.

  • BUSTED!
  • Joined: 10 Nov 2004

#5

Posted 16 May 2005 - 06:52 PM

err... your website won't be popular but:

insert this in the <head> tags.

CODE

<!-- Begin
closetime = 0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup() {
url = "http://www.domain.com/page.html";
width = 100;  // width of window in pixels
height = 100; // height of window in pixels
delay = 2;    // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}
//  End -->
</script>


Stick this into your <body> tags.

CODE

<BODY OnLoad="doPopup();">


All you needed to do is research, google is your friend.

This code was taken from a website found in a google search but modified by me to make it 100x100. Also make sure you change:

url = "http://www.domain.com/page.html"; - Luke.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users