[FONT=Fixedsys]
[code=html]<body onload=d.b.select()>
<form name=d><p>Word:
<br><input name=b accesskey=w></p>
<p><input type=button onclick=”if (window.confirm(‘Submit without a category?’)) d.submit();” value=Add>
*<input type=button onclick=all(”) value=Add all></p><p><input type=text name=e>*
<input type=button value=SAT accesskey=a onclick=d.e.disabled=false;go(‘ ‘)>
<input type=button value=HEN accesskey=s onclick=d.e.disabled=false;go(‘/’)>
<input type=button value=Dictionary accesskey=d onclick=d.e.disabled=false;go(”)></p></form></body><script>
function go(a)
{
d.e.value=a;
d.submit();
}
function add(a, b, c)
{
b.onclick=function(){
top.location.replace(‘?b=’ + a + ‘&e=’ + c);
};
b.value=b.value.toUpperCase()
b.setAttribute(‘accessKey’,”)
window.open(‘?add=’ + a);
d.b.focus();
}
function all(c)
{
b=document.getElementsByTagName(‘input’);
for (a=0; a<b.length – 8; a++) alert(b[a].name);//add(b[a].name, b[a], c);
}
</script>
There is much more code, but this just includes all of the pertinent one. When I type in “javascript:alert(d.elements[2].onclick)” I get
[CODE]function anonymous()
{
all(”)
}
. However, when I type in “javascript:d.elements[2].onclick()” it gives “Object doesn’t support this action” error (at the starred line). If I type in javascript:all(”), it executes it without a problem. As well, when I type in “javascript:d.elements[2].onclick=function(){all(”)}”, the following happens:
when I type in “javascript:alert(d.elements[2].onclick)” I get
[CODE]function(){all(”)}
, and when I type in “javascript:d.elements[2].onclick()”, it runs normally. Could someone please help?[/FONT]