Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Variables with DOM?

    I have a database that I populate data into a table with. The individual records can be updated by clicking on an "active" checkbox. Onclick of the checkbox, a javascript function runs.

    Here is my code:

    function Activate(CurrentBox) {
    if(frmIdeaAdmin.cbActive.checked){
    alert("Activating Record");
    }
    }


    Here is my problem:

    There are several checkboxes in the table... and I use a variable to track the current checkbox, hence, the 'CurrentBox' reference in the function call. The help I need is inserting the 'CurrentBox' variable into my DOM reference. I'm sure the solution is an easy one, but I can't figure it out. Here is what I would love to do - but it obviously doesn't work...

    ... frmIdeaAdmin.cbActive<%=CurrentBox%>.checked ...

    Any suggestions?
    Last edited by pixrite; 04-13-2005 at 07:16 PM.

  • #2
    New Coder
    Join Date
    Apr 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    All taken care of...

    Solved the issue.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •