[OpenLayers-Users] trouble using OpenLayers in JSF with IE client

Mike Quentel mikequentel at yahoo.com
Thu Nov 30 17:55:48 EST 2006


Many thanks to Christopher Schmidt.  Using the defer="defer" attribute in the initialisation script solved the problem.

The page loads OpenLayers.js and another script for loading Virtual Earth services.  Then there is an initialisation script in the page.  Then there is a div tag for the map.  Finally, the block of script that calls the initialisation has the defer attribute in the script tag, as in <script defer="defer">.

Since I need this to work independent of the onload event of the body tag, and do not have the luxury of loading other scripts in the head tag, using defer is essential to this working properly in IE with JSF.

Once again, many thanks Christopher.

Mike Quentel

Christopher Schmidt <crschmidt at metacarta.com> wrote: On Wed, Nov 29, 2006 at 02:33:35PM -0800, Mike Quentel wrote:
> Using JSF (developed using IBM Rational Software Architect), Websphere, and OpenLayers.js library.  The application uses the Microsoft Virtual Earth layer.  This all works just fine in Mozilla Firefox (of course), but unfortunately, I get the following error when attempting to access the same page in IE 6.0.2x:
> 
> "Internet Explorer cannot open the Internet site http://....  Operation aborted."
> 
> Has anyone else encountered this sort of behaviour?  Any ideas on how to solve this?  Seems to only happen when I use a template file from RSA (*.htpl).

Copying the HTML of your page somewhere would be helpful in this regard.
My first guess is that you are attempting to use some Javascript which
is not yet loaded -- when using Google Maps I've seen this problem when
I don't put a defer='defer' on external scripts which are attempting to
do things with the Google Maps API before it's actually loaded.

However, most of the OpenLayers examples only run code in 
onload="init()">, in which case this shouldn't be a problem. If you're
not running your code onload and might have it in the body of your page,
this might explain your problem.

Unfortunately, debugging this particular kind of error is quite hard,
but maybe you could put up an example HTML page that fails in order to
help investigation of this issue. 

Regards,
-- 
Christopher Schmidt
MetaCarta


 
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061130/aa49699a/attachment.html


More information about the Users mailing list