[Webtest] problem with javascript
Sébastien Mathy
webtest@lists.canoo.com
Mon, 25 Oct 2004 12:04:47 +0200
Hi,
I have a problem with javascript.
I want to test an html page that contains :
<form name="actionform" method="get" action="task_overview.php">
<script type="text/javascript" language="JavaScript">
<!--
function CheckAll2() {
for (var i=0; i < document.forms['actionform'].elements.length; i++) {
var e = document.forms['actionform'].elements[i];
if (e.name != 'checkit')
e.checked = document.forms['actionform'].checkit.checked;
}
}
//-->
</script>
<input type="checkbox" name="checkit" onclick="CheckAll2();" />
<input name="mark[]" type="checkbox" value="1010">
</form>
When I check the checkit checkbox, all checkbox should be checked (it
works in my browser).
In my test I do this :
<setinputfield name="checkit" value="on" />
<setinputfield name="action" value="-2" />
<new_setcheckbox name="checkit" checked="true"/>
But it doesn't work. Have you some advices about that?
Thanks
--
Sebastien Mathy