Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
Clear checkbox and textarea onload javacript

I made a javascript code to clear checkbox and textarea when the page loads. The code works on Firefox but it does not on google chrome. Do have any idea how to change my code to be fonctional on both browsers ?

Call the the javascript function onload:

<body onload="eraseTest()">

in the page the javascript code:

<td><input type="checkbox" name="ampli" id="ampli" value="ampli" onchange="valueChanged()">Ampli?


<script type="text/javascript">

    function valueChanged(){
    if (document.getElementById('ampli').checked) 
        {document.getElementById("subnetmaskdiv").style.display = 'block';
            
    }
    else
        document.getElementById("subnetmaskdiv").style.display = 'none';
        document.getElementById("subnetmaskdiv2").style.display = 'none';
    }
</script>

<script>
//Function to reset onload comment textarea and checkbox ampli+input fields of ampli
function eraseTest(){
document.getElementById("comment").value="";
document.getElementById("ampli").checked=false;
document.getElementById("geneName").value="";
document.getElementById("AmpliGene").value="";
}
</script>

<div id="subnetmaskdiv" style="display:none;">Gene:<input type="text" name="geneName" id="geneName"/>
<br/>Valeur Ampli:<input type="text" size="3" name="AmpliGene" id="AmpliGene"/></div></td></tr>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!