[Mapserver-users] Mapclient - new window

Jan Hartmann jhart at frw.uva.nl
Thu Oct 9 13:41:43 EDT 2003


Yes I see what happens now. I'm sorry, you cannot create new windows 
after the page has loaded in IE. I seem to have been sleeping when 
testing it under IE. IE cannot very well create iframes via the DOM 
interface (ie in pure JavaScript). To get things working under IE the 
code writes out old-fashioned HTML to the document. Once the HTML page 
has been created, no HTML can be added any more. For Mozilla I used the 
regular DOM methods to create iframes, so here they can be added after 
the page has loaded. This problem cannot be solved for IE: it just does 
not implement the full W3C standard for creating elements.

In your case however there is an easy way around. Just create a number 
of windows initially, but don't show them. You can make a window (e.g. 
w1) invisible by:

w1.div.style.visibility="hidden"

and visible by

w1.div.style.visibility="visible"

When a user requests a new window, just pop up one from the list. 
Additionally, you can let the user get rid completely of a window when 
he no longer needs it.  Windows are very lightweight elements, so you 
can create quite a lot of them without overburdening the browser.

I'll add two additional methods to the program to hide and show windows


HTH

Jan

PS Hiding the iframe when zooming and panning is indeed a good 
workaround when you want to display both windows and iframes. As I said, 
the mouse gets confused when meeting both of them.

Lars-goran Edholm wrote:
> I run IE&.0 with error kod listing and what I found was 
> in 
> row 831 sign 2 wrong argument	
> row 1242  sign 2    'div' is null or not an object
> 
> Here´'s a testpage which is very simple but doesn't work in IE6.0, I tried
> it on several computers:
> 
> <head><title>zoom3.html</title>
> <script src=../window.js></script>
> <script src=../bmnclient.js></script>
> </head>
> <body>
> <script>
> function newwindow(){
> w1 = new win(10,200,600,450,"Map 1")
> }
> setIconDir("graphics")
> m3 = new menu (
>     "New window",newwindow
> )
> m3.realSticky(true)
> m3.stickyButtons(true)
> m3.showAt(900,300)
> //w1 = new win(10,200,600,450,"Map 1")
> </script>
> 
> What I'm doing is to build an application that behaves like an Windows
> application with windows that the user can resize and move. Everything
> works fine with legends, querys etc. 
> My problem is that I can start the application with 1 or 2 or 3
> or...windows but I want to start with one or none windows and then should
> the user be able to create new windows in runtime.
> I'm currently running an testapplication in which i'm also having an
> iframe with an Intrawebapplication (Delphi) for searching parcels from an
> SQLserver database. The Intraweb application sends paramters to a
> mapclient window which zooms to the parcel. All this is working fine but
> there is som minor problems when I drag mapclient windows (not panning).
> Therefore I hide the IFrame when performing zooming and dragging
> operations. None of this is any problem in IE6.0.
> 
> 
>  Mvh
> Lars-Göran Edholm    tel 026/24 14 36
> 1:e byggnadsinspektör
> Bygg- och miljökontoret
> 811 80 Sandviken
> lars-goran.edholm at sandviken.se
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 




More information about the mapserver-users mailing list