Jump to content

Simulate onclick if certain radio button is selected


Eiolon

Recommended Posts

I am using a script that simulates an onclick if a checkbox was selected when my record loads, but have not been able to modify it for a radio button and if a certain value is selected.

 

Here is what I am using:

 

<script type="text/javascript">
window.onload = function() {
  if (document.forms[0].checkboxname.checked == true) {
    document.forms[0].checkboxname.onclick();
  }

}
</script>

 

Any ideas?  thnaks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.