Page 1 of 1
Popup query
Posted: Sat 14 Aug, 2004 22.57
by Andrew Muir
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.
Re: Popup query
Posted: Sat 14 Aug, 2004 23.18
by Neil Jones
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
Posted: Sun 15 Aug, 2004 11.55
by Sput
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.
Posted: Sun 15 Aug, 2004 16.40
by Andrew Muir
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.