iframe to switch between legend, layers and reference

Delfos, Jacob jacob.delfos at MAUNSELL.COM
Wed Nov 2 17:35:13 EST 2005


William,

I think you are better off trying to use visible/invisible DIV's, rather
than IFRAME's. Reason is that as far as I can tell in your
implementation, your iframe is not really part of your page, but a
completely separate document. Its content will not relate to the main
page, and when you submit your main page, the content if your iframe
will likely be ignored. Also, if someone changes layers in the legend,
this will be lost completely when the keymap is loaded into the iframe.

Normally, the only way you can get a separate frame to communicate with
your main page (your form), is by using javascript, to set/unset form
variables in the main page, when something changes in the iframe. To do
that for your legend, reference page, etc., is a bit impractical. In the
chameleon JSAPI samples, there is actually a useful example with "tabs"
using javascript and DIV's. I'm sure there are resources on the internet
explaining about tabs in javascript. This is faster too, since code
isn't loaded every time a user selects one option.

Hope this helps,

Jacob




________________________________

	From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of william paul
	Sent: 2 November 2005 23:21
	To: MAPSERVER-USERS at LISTS.UMN.EDU
	Subject: [UMN_MAPSERVER-USERS] iframe to switch between legend,
layers and reference
	
	
	Hello
	 
	I am trying to use iframe to switch between legend, layers,
search page and reference image. I can display the images in the iframe
but I can't interact with them. For example: I can see the reference
image but can't click on it and navigate around. The same with the layer
page. I can see the layers but I can't switch them ON OFF
	 
	My code is:
	<html>
	<head>
	<body>
	.....
	<a href="layer.html" target="iframe">Layers</a> <a
href="legend.html" target="iframe">Legend</a> <a href="search.html"
target="iframe">Search</a> <a href="legend.html"
target="iframe">Layers</a>
	 
	<iframe src="layer.html" name="iframe_switch" with="250"
height="250"></iframe>
	......
	</head>
	</body>
	</html>
	 
	I think I have to use some javascripts but I don't know where
and how. Does someone have a example? or a link from where I can read
more?
	 
	Thank you
	 
	William

	________________________________

	Yahoo! FareChase - Search multiple travel sites in one click.
<http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2OD
gxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//
farechase.yahoo.com/>  



More information about the mapserver-users mailing list