Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML + iframe/object

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
0
0
GB
So I've spent a while making a fully XHTML 1.1 strict site despite it stretching to size and spacing out nav buttons and so on. I'm proud of what I've knocked together. But now I need to stick a google map in - and they (still) use iframes. Perhaps because the object tag is messed up in some browsers and the xframe object never materialised (sigh - standards).

Anyway what I've found is using object everything works perfectly. Except in IE9 strict, where I only get the bottom right corner of the map appear and then you get the "Loading ... too slow - try troubleshooting" google link in top middle of map box. I changed to iframe despite breaking my CHTML validation but I get the same thing! Infuriatingly the old site with the googlemap works fine even in IE9 and the doctype for that is a dtd'less HTML4.01 (trying that now is the same effect as no doctype so I guess that's what it is being interpretted as). But trying that out just messes the rest of the page up.

What can I do fellow goole mapping XHTMLers? I've heard you can somehow use an iframe module or custom dtd - but I can't find an example and have no idea how to do anything like that :(

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
I see .. that's a little broken on my IE9 but otherwise it's ok. But that's using the googlemap API, whereas I'm using a literal googlemap link eg "embed this map" link on google maps

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Yep looks a bit odd as I've quickly hacked out some non-compliant code just to show the general principle. Any reason you don't use the API - that is what it's proved for.

If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
I don't use the API because API maps don't seem to operate in the same way. They are like a primative version. They don't seem to have momentum when scrolling, the don't support the mousewheel and other basic things people take forgranted when using google maps

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Of course I'd be happier to use the object tag instead of an iframe - which I did initially. But it had the same problem I now have with the iframe which is why I changed it back to iframe (which then behaved the same in IE9). Doh ...

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Ok well I really don't know what was going on - possibly my PC/IE wasn't happy with all the stuff I have running 24/7 or was corrupting my sessions etc. But now I have an iframe tag that is showing fine in my IE9 despite the xhtml 1.1 strict doctype. It does break the xhtml validation (I can't find how to edit xhtml 1.1 strict DTD to include iframe support even though I find confusing pages of info suggesting how to do it) but I don't mind that for 1 page of my entire site. Having compared the API version on your site to the embedded iframe one on mine it seems the iframe one doens't capture mousewheel events either, so the only real difference is momentum on the map while panning. But it's the little things that we take forgranted :)

Ironically enough - it is also back to working now using the object tag instead of the iframe tag!! How bizarre. I haven't rebooted or anything but I did close lots of ie windows etc.

So for now I have a choice of object tag which I'm not sure what browsers/versions it will work right on vs iframe that should work right everywhere but invalidate. Since noone knows or cares whether it validates really, I'll take the later until someone educates me how to validate an iframe in xhtml 1.1 strict or how to make sure object tag works in older IE and all other browsers etc.

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top