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
    Jun 2009
    Posts
    20
    Thanks
    3
    Thanked 0 Times in 0 Posts

    if statement wont work

    Here is my code.
    Code:
    <script type="text/javascript">
    var change1 = 1;
    function changeDiv1()
    { 
      if (change1 == 1)
      {
        change1 = 2;
        document.getElementById("Left").style.width = "15px";
        document.getElementById("Right1").style.width = "930px";
        document.getElementById("X").innerHTML = "||";
      {
    }

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,142
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    document.getElementById("X").innerHTML = "||";
    { // should be }
    }

    Have you left off the closing </script> tag?


    It is your responsibility to die() if necessary….. - PHP Manual


  •  

    Posting Permissions

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