![]() |
How do I add multiple instances of Javascript on one page? Hi All, I'm attempting to put several instances of Javascript code on the same page but it isn't working. Here is the code that goes in the header... Code: <script type="text/javascript">Code: <p align="center"><form action="#"><input type="checkbox" onchange="toggleAccept()" id="agreeCheckbox">Please help! Thanks, Vic |
Re: How do I add multiple instances of Javascript on one page? HTML Code: var acceptLink = document.getElementById("accept");If you keep the same id's then it will only work on the first items with those id's. Try changing the id's for the 2nd and 3rd items you are trying to make calls on and see if that fixes the issue. Dave |
Re: How do I add multiple instances of Javascript on one page? Hey Dave I tried that but the result is that the second checkbox works but not the first checkbox. |
Re: How do I add multiple instances of Javascript on one page? Can you post a link to the page that your having problems with or more of the html. Like dwbiz05 said it sounds like your element ids aren't unique. |
| All times are GMT -6. The time now is 04:22 AM. |