[worldKit-dev] 3 layer switch

Mellnik, Ted TMellnik at charlotteobserver.com
Tue Sep 25 13:59:51 PDT 2007


Mikel,

Thanks for hint. This is sort of where we're going...


<SCRIPT type=text/javascript>
//
var moldlayer='Elementary';
function activate(mnewlayer) 
{
	// turn off the previously selected layer
	// & turn on the newly selected layer 
	document.worldkit.SetVariable("JLayComm",moldlayer);
	document.worldkit.SetVariable("JLayComm",mnewlayer);
	//  alert("Turn on layer: " + mnewlayer + " / Turn off layer: " +
moldlayer); // for testing;
    moldlayer = mnewlayer ; 
 }
function echeck()
{	// check default layer when page is loaded or reloaded
	document.schoolmap.getspan[0].checked = true ;
	document.schoolmap.getspan[1].checked = false ;
	document.schoolmap.getspan[2].checked = false ;
	//alert('reloaded');	 // for testing ; 
}
</SCRIPT>

---------------------

<BODY onload="echeck();">

------------------------

   <FORM NAME=schoolmap>
    <input type="radio" checked name="getspan" value="e"
onclick="activate('Elementary');">
	Elementary
	
	<input type="radio" name="getspan"  value="m"
onclick="activate('Middle');">
	Middle
	
	<input type="radio" name="getspan"  value="h"
onclick="activate('High');">
	High
	</FORM>	




> -----Original Message-----
> From: Mikel Maron [mailto:mikel_maron at yahoo.com]
> Sent: Tuesday, September 25, 2007 10:46 AM
> To: Discussion of worldKit use and development
> Subject: Re: [worldKit-dev] 3 layer switch
> 
> 
> Hi Ted
> 
> Store the current visible layer id in javascript. When 
> another radio button is selected, first toggle the current 
> layer, then the new layer. Make sense?
> 
> That's possible now, without any source modifications. This 
> can be done better within worldKit, needs a coder.
> 
> Let me know if I can help further.
> 
> Mikel
> 
> ----- Original Message ----
> From: "Mellnik, Ted" <TMellnik at charlotteobserver.com>
> To: "worldkit-dev at lists.brainoff.com" 
> <worldkit-dev at lists.brainoff.com>
> Sent: Tuesday, September 25, 2007 6:33:23 AM
> Subject: [worldKit-dev] 3  layer switch
> 
> 
> Hi. I have three layers I'd like to have in mutually 
> exclusive display,
> controlled by radio buttons, & seeking hints /suggestions of 
> how to do that
> using Javascript. 
> 
> JLayComm doesn't seem to know if a layer is on or off; it 
> just toggles.
> 
> Thanks.
> --
> Ted Mellnik
> The Charlotte Observer
> tmellnik at charlotteobserver.com
> 704-358-5028 
> _______________________________________________
> worldkit-dev mailing list
> worldkit-dev at lists.brainoff.com
> http://lists.brainoff.com/listinfo.cgi/worldkit-dev-brainoff.com
> 
> 
> 
> _______________________________________________
> worldkit-dev mailing list
> worldkit-dev at lists.brainoff.com
> http://lists.brainoff.com/listinfo.cgi/worldkit-dev-brainoff.com
> 



More information about the worldkit-dev mailing list