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 6 of 6
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with selecting table row.

    Hello there guys.

    I have attached here my html file along with javascript.
    As you can check from my html file, when I select a table row, the selected row property(background color, border) changed. However, when I select another table row, the previous selected row didn't back to the original property of it. With my given javascript, I'm having a hard time to figure it out how it will back to the original property.
    Can please someone out there try to check my script and help me with this matter.

    Thanks.
    Attached Files Attached Files

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Attaching zipped files to your post is about the worst way to get help - you would have to wait for a rather altruistic soul with patience to save, unzip, load to come along... Best is to provide a link to the code in question, or post relevant parts of it.
    That said, you are welcome to examine the following sample and extract the functionality you are after: http://webdeveloper.klproductions.com/demos/movetr.html
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    New Coder
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the link, though it didn't help me with my problem.
    As on my attached file, I think, it's only a matter of manipulation with the script to work things fine. Hope someone out there may check my scripts so that I will know what went wrong with my scripts.

    One more thing, I attached my files so that someone may know what my problem is, coz I think that if I only post the script code, you may wonder what problem I am pointing to.

    Thanks again.
    Last edited by BabySpidy; 09-20-2005 at 05:50 PM.

  • #4
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Vladdy,
    I wanted to extract the code for that page and could not view the source.
    Could you send it to me or tell me how to get it? Thanks.

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Posts
    282
    Thanks
    0
    Thanked 0 Times in 0 Posts
    change the following lines:

    Code:
    // line 31
    trs[j]._className = trs[j].className + addClass;
    
    // line 36: within set_color()
    this.className = this._className + classType;
    it continued to increment the className each click.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by webgeo99
    Vladdy,
    I wanted to extract the code for that page and could not view the source.
    Could you send it to me or tell me how to get it? Thanks.
    There is nothing on that page that attempts to prevent you from viewing the source. Check your browser setting..... I remember there was a cache related problem with IE not doing "View Source".... You can always "save the page as" too - all my demos are single page documents: all JS, CSS and HTML are there - no linked resources to make it easier for people to see how its done
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"


  •  

    Posting Permissions

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