Dear all,
I would like to use pre defined variable in [B]window.open[B]undefined[B].js
[code]
function textlabel()
{
myRef = window.open(”,’mywin’,’left=20,top=20,width=500,height=500,toolbar=1,resizable=0′)
docRef = myRef.document.open(“text/html”,”replace”);
myRef.document.write(‘<html><head><b> Text Label Properties:</b></br></br> <title>Text Label Properties</title> </head>’
+'<body bgcolor=white onLoad=”self.focus()” form=txtlblfrm>’
+’The position of the object, defined by its coordinates</br> in the 3D world. Can be one of the following: </br> <b> SGCoord3D/ SGCoord2D/ SGPosition </b></br></br></br> <b> X-Position: </b><input type=”text” name=”lblxpos”/></br></br>’
+'<b> Y-Position: </b><input type=”text” name=”lblypos”/></br></br>’
+'<b> Label Text: </b><input type=”text” name=”lbltxt”/></br></br>’
+'<input type=”button” value=”Submit” onclick=”cretxtlbl()” src=”global()”><nbsp>’
+'<input type=”button” value=”Cancel” onclick=””>’
+'<script language=”javascript”> function cretxtlbl() { var xpos = document.all[“lblxpos”].value; alert(xpos); var ypos = document.all[“lblypos”].value; alert(ypos); var txt = document.all[“lbltxt”].value; alert(txt); var label = globe.creator.createTextLabel(xpos,ypos,txt); alert(label); globe.root.appendChild(label); globe.navigate.flyTo(label); } </script>’
+'</body></html>’)
myRef.document.close()
}
I thank you all in advance,
Sharat.