tommo77funk
10-07-2008, 10:53 PM
Hi,
I am hoping some kind soul can enlighten me on how to communicate with an applet when it is put in a .js file.
I was trying to get rid off the annoying "click to activate this control" (viewed with I.E.) so i moved the applet from my html page to a seperate js file and used document.write etc.
The problem now is that all the js functions i had in my html to communicate with the applet dont work.
My .js file is called my_applet.js and in my html i have the following function
//head
<script type="text/javascript">
flip=false;off="Start";on="Stop"
flip=false;on="Stop";off="Start";
function toggle(pn){
p=parseInt(pn,10);
if(flip){
document.player.execpano("set(\"sfxRai\",\"visible\",false)")
}else{
document.player.execpano("set(\"sfxRai\",\"visible\",true)")
}
flip=!flip;
}
</script>
//body
<input type="image" src="images/73.gif" onclick="toggle('0')" value="rain" />
I tried putting all my js functions in with the applet in the js file (preferred option) but it did'nt work.
I have been searching forums for a couple of days and have an idea that it may be something to do with getting the document id but am not sure.
I Would be really grateful for any advice.
Best wishes and many thanks,
tom
I am hoping some kind soul can enlighten me on how to communicate with an applet when it is put in a .js file.
I was trying to get rid off the annoying "click to activate this control" (viewed with I.E.) so i moved the applet from my html page to a seperate js file and used document.write etc.
The problem now is that all the js functions i had in my html to communicate with the applet dont work.
My .js file is called my_applet.js and in my html i have the following function
//head
<script type="text/javascript">
flip=false;off="Start";on="Stop"
flip=false;on="Stop";off="Start";
function toggle(pn){
p=parseInt(pn,10);
if(flip){
document.player.execpano("set(\"sfxRai\",\"visible\",false)")
}else{
document.player.execpano("set(\"sfxRai\",\"visible\",true)")
}
flip=!flip;
}
</script>
//body
<input type="image" src="images/73.gif" onclick="toggle('0')" value="rain" />
I tried putting all my js functions in with the applet in the js file (preferred option) but it did'nt work.
I have been searching forums for a couple of days and have an idea that it may be something to do with getting the document id but am not sure.
I Would be really grateful for any advice.
Best wishes and many thanks,
tom