Page 1 of 1

popups across browsers

Posted: Wed 24 Apr 2013 3:50 pm
by gluepack
Oh the joys of website design.

I "borrowed" some js popup code to display photos of locations described on a Google map within the framework of a saratoga template page http://www.jerbils.info/saratoga/wxzlatina.php.

Essentially, it does a window.open specifying the URL of the image, a window name (all different) and additional width and height parameters (which are essentially, 600 x appropriate amount to preserve aspect ratio). All except one image is (much) larger than the window size specified.

. Firefox/Waterfox (16.0.1) displays it exactly as I want,
window, the size specified,
image fitting exactly in the frame,
window resizable and
+/- zoom option
it even tells me at the top what the scaling % is
and the one image that is only 496 wide (in 500 window as opposed to 600) is expanded appropriately

. Chrome 26.0.1410.64 m displays it exactly the same as Firefox (except for scaling % and)
except for the one image that is only 496 wide originally. It leaves an appropriate right and bottom margin.

. Safari 5.1.7 displays them reasonably enough
apart from leaving a deep (additional) bottom margin for some reason
the image is the same size as Chrome & Waterfox though
the one image that is only 496 wide has the small right margin as well as the deep bottom margin

. SeaMonkey 2.17.1 displays everything fine, including its normal bottom line gumph, except that the image is displayed full-size in the window (a bit alarming on the second image as it was just the white sky shown which made it look as if no image was being displayed). The - zoom reduces it to fit the window exactly.

. Internet Explorer 10
window not the size specified (smaller)
thin top and left margins
fat bottom and right margins
not resizable (even when zoomed)
+/- zoom option

I don't care about the minor things, like margins, but any idea why I can't resize the images in IE?

Running under Win 7.

Ooi, on a different topic, any idea why the forecast on the "Conditions" box on the Google map on that page seems to bear no relation to the Wunderground forecast on the "Forecast Details" page even though they are in theory based on the same area?

Re: popups across browsers

Posted: Wed 24 Apr 2013 4:07 pm
by steve
gluepack wrote:I don't care about the minor things, like margins, but any idea why I can't resize the images in IE?
You could try adding an explicit resizable=yes on the third parameter of the call of window.open().

Re: popups across browsers

Posted: Wed 24 Apr 2013 4:49 pm
by gluepack
Well, I tried that, adding it to the first occurrence, albeit incorrectly the first time as I omitted the comma before it and now the header for my pages is screwed up in IE, even after correcting it. Clearing the IE cache doesn't seem to resolve the problem and all other browsers are working fine. How can making a minor change like that cause such a problem?

Re: popups across browsers

Posted: Wed 24 Apr 2013 4:55 pm
by steve
The page still looks OK here in IE10. Something still cached somewhere?

Re: popups across browsers

Posted: Wed 24 Apr 2013 5:10 pm
by gluepack
Well, it is weird as my main site is screwed in IE as well. I have gone through the process of clearing cache in IE using the normal approach but it doesn't seem to resolve the problem.

Re: popups across browsers

Posted: Wed 24 Apr 2013 5:14 pm
by steve
I don't think you need that leading comma anyway; it's just a comma-separated list of properties.

I tried this in IE10:

window.open("http://google.com","awindow","width=600, height=450")

and it gives me a non-resizable window.

This, OTOH:

window.open("http://google.com","awindow","width=600, height=450,resizable=yes")

gives me a resizable one.

Re: popups across browsers

Posted: Wed 24 Apr 2013 5:37 pm
by gluepack
That leading comma follows the window name on the generated code doesn't it? Oh no, you may be right.
I'm more concerned at the moment re. how IE is behaving on my system. There was one other thing that I did do and that was download a new version of SeaMonkey. Perhaps I will re boot and see if that resolves the problem.

So, posting this was a problem, Chrome went into limbo and I wasn't sure if it was posted. So, I rebooted and it isn't fun when you see a message "He's dead, Jim!", which apparently is a quite innocuous message from Chrome when it runs out of memory. Not the sort of message you want to see though.

So, I rebooted and still couldn't get on sandaysoft.com (but at least it tells me that it is down for everybody). And, IE was still behaving badly.

Well, I thought why not deinstall IE10 and then reinstall it? Having deinstalled it and rebooted the icon was still on the status bar and selecting it brought up IE? Lol, what is that about?

However, at least sandaysoft.com is back. Now I have to figure out how to really deinstall IE10 and reinstall it.

Re: popups across browsers

Posted: Wed 24 Apr 2013 6:29 pm
by mcrossley
I suspect IE has switched into quirks mode or some other non-native mode. Check and switch it back via the f12 dev tools.

Re: popups across browsers

Posted: Wed 24 Apr 2013 6:42 pm
by gluepack
Well, you were right. It appeared to be in IE9 compatibility mode. Lol, perhaps I hit it rather than refresh on one occasion.

Thanks for that.

And, my last post isn't quite correct because it did deinstall IE10 and I am running on 9 now. So... now to reinstall 10.

Re: popups across browsers

Posted: Wed 24 Apr 2013 7:57 pm
by gluepack
So I tried resizable=yes and, yes that works for IE.

However, I noticed that Chrome now displays fat bottom and right margins. How does something like that happen?

Not only that but Chrome now displays latitude and longitude lines on the map (see my other thread) whereas the others don't.
Arrrghhh!!!!

If I remove the resizable parameter IE is no longer resizable but Chrome still shows margins.

Waterfox is fine and Safari still displays as before, with just a bottom margin.

btw I lied when I said "I don't care about the minor things, like margins". I think they look like crap and don't see the point of them. Are they inherited? Firefox/Waterfox does what I want.

Re: popups across browsers

Posted: Sat 27 Apr 2013 8:02 am
by gluepack
Well, I've found a much better solution (to my mind, anyway) that displays images on hover. No worries about margins and the gumph re. the file name is not displayed either.

viz. Where we are
or "Where we are" on the "About" menu at my weather site.

Now, if only my brain could comprehend how to move the image down the map a bit as anything other than top:0; moves it relative to the start of the body of descriptive text as the image counts as a size of zero within the div, I guess.