micjohnson
07-11-2003, 11:28 PM
is there a way to tareget a frame when useing the document.write command, the reason i am askin is becuase I am trying to create a way to change a variable in my applet at the click of a button for some reason this doesnt work PLEASE HELP ME ONLY IF YOU ARE 18 OR OLDER!!!
<html>
<head>
<SCRIPT language=JavaScript>
var i=null
function go (){
if (i != null){}
y=i;
document.getElementById('1').innerHTML = '<applet codebase="...url..." code="lsl08" width="284" height="212"><param name="po" value="1"><param name="channel" value="'+y+'"></applet>';
document.getElementById('2').innerHTML = '<input type=text value="'+y+'">'
}
</SCRIPT>
</head>
<body>
<div id=1></div>
<div id=2></div>
<input type=button onclick="javascript:i=1" value=1><input type=button onclick="javascript:i=2" value=2><input type=button onclick="javascript:go()" value=go>
</body>
</html>
The wierd thing is if you type in the applet code without the java function it works...
<html>
<head>
<SCRIPT language=JavaScript>
var i=null
function go (){
if (i != null){}
y=i;
document.getElementById('1').innerHTML = '<applet codebase="...url..." code="lsl08" width="284" height="212"><param name="po" value="1"><param name="channel" value="'+y+'"></applet>';
document.getElementById('2').innerHTML = '<input type=text value="'+y+'">'
}
</SCRIPT>
</head>
<body>
<div id=1></div>
<div id=2></div>
<input type=button onclick="javascript:i=1" value=1><input type=button onclick="javascript:i=2" value=2><input type=button onclick="javascript:go()" value=go>
</body>
</html>
The wierd thing is if you type in the applet code without the java function it works...