...

View Full Version : select checkbox after page loads



Local Hero
05-24-2005, 07:59 PM
I have a function that works with checkboxes, but when the page loads it clears one of the checkboxes that I want checked. Even when I have "checked" in the input tag. How can I set a time so it will be checked after tha page loads, like 2-3 seconds?

Shwaza
05-24-2005, 08:41 PM
Well you might just wanna try as soon as it loads, try this:

<script language="javascript" type="text/javascript">

function check(){
document.formname.inputname.checked="checked";
}

</script>

<body onload="check()">

And just replace formname and inputname with your form and input names.

glenngv
05-26-2005, 06:01 AM
document.formname.inputname.checked="checked";

Should be true not "checked".

document.formname.inputname.checked=true;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum