Log in

View Full Version : help with a popup link



pdsok
06-30-2007, 02:04 PM
http://www.tstiger.org.uk/news.htm

On this webpage in the 'ships log' section I use popup links to pages with more info,

In the entries for 16th June and the 2nd/3rd June the link opens incorrectly in a full sized window in IE(v7) but opens correctly (520 px wide) in firefox(2.0.0.4)

In all other instances of the links in the log they work ok in both browsers, they are also ok in previous years logs.

when i use the links i just cut n paste them in from a comment in that same page

As far as i can see the links are the same format but I just can't see why they work differently

IE reports an error for line 142 and 182 character 1 as 'invalid argument' but i just can't see any difference.

I would appreciate any help thanks
PdS

jscheuer1
06-30-2007, 03:32 PM
Technically, you cannot have spaces in the name/target field for window.open() method:


window.open('2007openday/popopenday.htm', 'Open Day 07', 'resizable=no, scrollbars=yes, toolbar=no, loca . . .

Many browsers will let you get away with it, but IE 7 will not, you can do:


window.open('2007openday/popopenday.htm', 'Open_Day_07', 'resizable=no, scrollbars=yes, toolbar=no, loca . . .

Also, since you are opening the link itself in the pop up, you can do:


window.open(this.href, 'Open_Day_07', 'resizable=no, scrollbars=yes, toolbar=no, loca . . .

Finally, since true/false specifications not listed are configured as false and those listed are configured as true even when no value is given, you could use just:


window.open(this.href, 'Open_Day_07', 'scrollbars, width=540, height=500, top=50, left=5')

for this type of pop up.

jscheuer1
06-30-2007, 03:55 PM
Wait, I spoke too soon! For what you are doing, since you already list the target in the anchor tag, you could even have:


<a href="2007openday/popopenday.htm" target="_blank" onclick="window.open(this.href, this.target, 'scrollbars, width=540, height=500, top=50, left=5');return false;">

pdsok
06-30-2007, 05:36 PM
Thanks for the help I shall try that out,
I didn't know about the spaces and I think that they are the first time i have used them.

thanx again
PdS