Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2

Thread: JS Help

  1. #1
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default JS Help

    Anyone know whats wrong with my function (ie when a box is checked, the bgcolor of the row changes..

    Its just showing JS error and nothing happens

    HTML Code:
    <script type="text/javascript">
    function turn(id)
    {
    var check = "f" + id;
    var rowid = "r" + id;
    if(document.form.getElementById(check).checked = false)
     {
     //The box has been unchecked
     document.form.getElementById(rowid).bgcolor = "#FFFFFF";
     }
     else
     {
     //The box has been checked..
     document.form.getElementById(rowid).bgcolor = "#CCFFFF";
     }
    }
    </script>
    Coming and going...
    Highers are getting the better of me

  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Couldnt edit,

    found and fixed the problem, forgot to give the checkbox field an id and didnt use the style.backgroundColor attrib.

    ty anyways.
    Coming and going...
    Highers are getting the better of me

Posting Permissions

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