OS OpenSpace [logo]

OS OpenSpace Forum » OS OpenSpace » OpenSpace Forum

Thread: Not working with IE8 but OK with FireFox, Chrome & IE9

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Pages: 1 - Last Post: 13-Jun-2011 21:40 by: StevensonWay Threads: [ Previous | Next ]
StevensonWay

Posts: 3
Registered: 08/06/11
Not working with IE8 but OK with FireFox, Chrome & IE9
Posted: 10-Jun-2011 16:45
  Click to reply to this thread Reply

I am unable to get the mapping to work with IE8 (and also IE6). All I get is the rectangle outline and nothing else. The page source looks OK it is just not being rendered. I have tried all sort of things with IE8 (lowering security, etc) and on different computers.

The web site is www.stevensonway.org.uk and the page is http://www.stevensonway.org.uk/the-way.aspx

The site is built using mojoPortal (a CMS system using .NET) but I do not think it a problem with that as it is fine on other browers.

Any ideas?
Ian Logan

rgphilpott

Posts: 146
Registered: 18/06/12
Re: Not working with IE8 but OK with FireFox, Chrome & IE9
Posted: 10-Jun-2011 23:38   in response to: StevensonWay
  Click to reply to this thread Reply

You're trying to copy an entire HTML page into the main page, including all the header elements. An HTML page can only have one DOCTYPE, one <head> element and one <body> element - you've got two of each, one nested inside the other.

In principle any browser should fail with this, but some are more tolerant of this sort of error than others...

I don't know mojoPortal at all, so can't advise on how , but basically what you need to do is either:

1) move all the <script> blocks from their current location into the main page header (ie, between the first <head> and </head>), move the onload="initmapbuilder()" into the first <body> statement and then get rid of everything else in your map page apart from the <div id="map">;

or

2) keep the whole map page intact but host it as an independent page and embed it into your main page in an <iframe>.

Richard.

StevensonWay

Posts: 3
Registered: 08/06/11
Re: Not working with IE8 but OK with FireFox, Chrome & IE9
Posted: 11-Jun-2011 17:56   in response to: StevensonWay
  Click to reply to this thread Reply

Many thanks, I understand the problem now. The way mojoPortal works is that there are different plug-in sections for each page. One of these is an HTML fragement inclusion which allows you to insert HTML from a file into the page. It might be a bit difficult to arrange the code as you suggest but I will investigate further now that you have clarified things.

Kind Regards
Ian Logan

rgphilpott

Posts: 146
Registered: 18/06/12
Re: Not working with IE8 but OK with FireFox, Chrome & IE9
Posted: 11-Jun-2011 23:56   in response to: StevensonWay
  Click to reply to this thread Reply

OK, in that case I suggest that into your HTML fragment you just copy all the <script> blocks, plus the <div id="map" ... ></div> — don't copy anything else (ie, ignore all of the doctype, html, head, title and body tags).

You still need to invoke the initmapbuilder() function when the body loads, presumably without being able to modify the first <body> tag.

Luckily, however, you already are already loading jQuery, so you can instead make use of that: just insert the line:

$(document).ready(initmapbuilder);

immediately before the function initmapbuilder() in your last <script> block.

That should work, I think.

Richard.

StevensonWay

Posts: 3
Registered: 08/06/11
Re: Not working with IE8 but OK with FireFox, Chrome & IE9
Posted: 13-Jun-2011 21:40   in response to: StevensonWay
  Click to reply to this thread Reply

Many, many thanks. Your solution works and that is a real help.

Ian Logan

Legend
Expert: 51 - 1000 pts
Advanced: 31 - 50 pts
Intermediate: 16 - 30 pts
Novice: 5 - 15 pts
Newbie: 0 - 4 pts
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums