Popup query

Andrew Muir
Posts: 61
Joined: Thu 21 Aug, 2003 19.24

Whilst browsing the BBC's website I notice they often open up new, resized, windows using the technique below. (using this as the hyperlink address)

javascript%20void%20window.open('http://www.google.co.uk',%20'1063797670',%20'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=317,left=312,top=100');

I didnt realize you could do this, and it has made my life so much easier.

I was just wondering what the 1063797670 part of the link meant, when i delete it, it doesnt seem to work.
Image
Neil Jones
Posts: 661
Joined: Thu 11 Sep, 2003 20.03
Location: West Midlands

Andrew Muir wrote:Whilst browsing the BBC's website I notice they often open up new, resized, windows using the technique below. (using this as the hyperlink address)

javascript%20void%20window.open('http://www.google.co.uk',%20'1063797670',%20'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=317,left=312,top=100');

I didnt realize you could do this, and it has made my life so much easier.

I was just wondering what the 1063797670 part of the link meant, when i delete it, it doesnt seem to work.
Looks like a unix timestamp to me, I wouldn't be surprised if it's some sort of "this link was made/verified on this date".

However you can remove just that number but not anything else and still get it to work. So change this bit (straight after the URL you want to open):

,%20'1063797670',%20'toolbar=0

to this:

,%20'',%20'toolbar=0
User avatar
Sput
Posts: 7547
Joined: Wed 20 Aug, 2003 19.57

I think they're using the timestamp for the name of the window (you need to specify one). By using one, they're making sure that they have a unique name. If they used "newwindow" or something, it might override another "newwindow" the user might have open.

'Tis good thinking that.
Andrew Muir
Posts: 61
Joined: Thu 21 Aug, 2003 19.24

Yeah I thought it might be a unique ID for the window, but I have tried having multiple windows linked from the same page and it works anyway. Very nice useful script that one, for php dummies like me! Thanks for your help.
Image
Please Respond