Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i call a dynamic object in the script

Status
Not open for further replies.

nkrishnaraj

Programmer
Nov 9, 2000
1
IN
<html>
<head>
<script language=&quot;JavaScript&quot;>

function checkall() { for (i=1;i<=document.sender.ss.value;i++){
subu =new String(&quot;document.sender.chq[&quot;+i+&quot;]&quot;);
temp(subu)
}
return true}

function temp(ss){
if (ss.checked){
alert(&quot;iN IF&quot;);
}
else{
alert(&quot;iN ELSE&quot;);
}
return true }
</script>
</head>
<body>
<form name =sender>
<input type=checkbox name = chq[1] onclick=&quot;return temp(this)&quot;><br>
<input type=checkbox name = chq[2] onclick=&quot;return temp(this)&quot;><br>
<input type=hidden name = ss value= 2>
<input type=&quot;button&quot; name = &quot;yes&quot; value=Checkall onclick=&quot;return checkall()&quot;>
</form>
</body>
<html>
 
If I understand you correctly, I think you need to use the window.eval(string) function... you build a string and then pass it to eval and the interpreter executes it exactly jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top