Click to See Complete Forum and Search --> : question ONLY FOR 18+ HAS TO DO WITH WEBCAMS


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...

brendandonhue
07-11-2003, 11:43 PM
Oops sorry I can't help. I forgot that its illegal for minors to help with javascript :rolleyes:

micjohnson
07-11-2003, 11:59 PM
this is the part I would like to change

<param name="channel" value="'+y+'">

Scriptage
07-12-2003, 07:14 AM
<SCRIPT language=JavaScript>
function go (y){
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>

<div id=1></div>
<div id=2></div>

<input type=button onclick="javascript:go(1)" value=1><input type=button onclick="javascript:go(2)" value=2><input type=button onclick="javascript:go()" value=go>

Scriptage
07-12-2003, 07:22 AM
Just tested it, and it works.