[Mapserver-users] jBox access method problem

Jorge Alberto Arocha Muñoz jorge_alberto at arocha.net
Mon Nov 24 17:51:52 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_1A91_01C3B29A.7EF68A20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi:

I have the next problem:

1. My template:








.......

........


.............



.......




2. My file sig.js:

function clickboton(objeto) {
activo.src = base + activo.name + '_nopres.png';
activo = objeto;
objeto.src = base + objeto.name + '_pres.png';
switch (activo.name) {
case 'info' :
map_obj.modo = 'nquery';
break;
.....
}

this way all it's Ok, but i want use only function in the event onClick
of tag img and try the next changes:

1. tag img: 


2. in isg.js file:
function clickboton(objeto) {
activo.src = base + activo.name + '_nopres.png';
activo = objeto;
objeto.src = base + objeto.name + '_pres.png';
switch (activo.name) {
case 'info' :
map_obj.modo = 'nquery';
document.jBox.boxon();
break;
.....
}

In the javascript debugger display :

Exception ``TypeError: document.jBox.boxon is not a function thrown from
function clickboton() ...................

Any idea? 

I try with:

- document.applets.jBox.boxon();
- document.applets[0].boxon();


Thanks for all......


JORGE ALBERTO AROCHA MUOZ
Ingeniero de Sistemas UIS
Especialista Sistemas Inf. Geogrfica 


------=_NextPart_000_1A91_01C3B29A.7EF68A20
Content-Type: text/html
Content-Transfer-Encoding: 7bit

<HTML>
<BODY>
Hi:<br>
<br>
I have the next problem:<br>
<br>
1.  My template:<br>
<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br>
<html><br>
<head><br>
  <script language="javascript" src="/interface_sig/javascript/sig.js"></script><br>
</head><br>
<body><br>
       .......<br>
      <img name="info" src="/interface_sig/imagenes/info_nopres.png"   onClick="clickboton(this); document.jBox.boxon();"><br>
       ........<br>
       <form method="GET" name="mapserv" action="/cgi-bin/mapserv"><br>
        .............<br>
        <applet codebase="/interface_sig/jBox" code="jBoxPNG.class" width="578" height="305" name="jBox" MAYSCRIPT><br>
             <param name="image" value="http://[host][img]"><br>
	</applet><br>
        .......<br>
</body><br>
</html><br>
<br>
2.  My file sig.js:<br>
<br>
function clickboton(objeto) {<br>
		activo.src = base + activo.name + '_nopres.png';<br>
		activo = objeto;<br>
		objeto.src = base + objeto.name + '_pres.png';<br>
		switch (activo.name) {<br>
			case 	'info'		:<br>
						map_obj.modo = 'nquery';<br>
						break;<br>
                  .....<br>
}<br>
<br>
this way all it's Ok, but i want use only function in the event onClick of tag img and try the next changes:<br>
<br>
1.  tag img: <br>
    <img name="info" src="/interface_sig/imagenes/info_nopres.png"   onClick="clickboton(this)"><br>
<br>
2.  in isg.js file:<br>
     function clickboton(objeto) {<br>
		activo.src = base + activo.name + '_nopres.png';<br>
		activo = objeto;<br>
		objeto.src = base + objeto.name + '_pres.png';<br>
		switch (activo.name) {<br>
			case 	'info'		:<br>
						map_obj.modo = 'nquery';<br>
                                                document.jBox.boxon();<br>
						break;<br>
                  .....<br>
     }<br>
<br>
In the javascript debugger display :<br>
<br>
Exception ``TypeError: document.jBox.boxon is not a function  thrown from function clickboton() ...................<br>
<br>
Any idea? <br>
<br>
I try  with:<br>
<br>
- document.applets.jBox.boxon();<br>
- document.applets[0].boxon();<br>
<br>
<br>
Thanks for all......<br>
<br>
<br>
JORGE ALBERTO AROCHA MUOZ<br>
Ingeniero de Sistemas UIS<br>
Especialista Sistemas Inf. Geogrfica
</BODY></HTML>
<BR> 
------=_NextPart_000_1A91_01C3B29A.7EF68A20--




More information about the mapserver-users mailing list