Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-20-2005, 11:18 AM   PM User | #1
BabySpidy
New Coder

 
Join Date: Sep 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
BabySpidy is an unknown quantity at this point
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
File Type: zip htmlfiles.zip (4.4 KB, 109 views)
BabySpidy is offline   Reply With Quote
Old 09-20-2005, 01:20 PM   PM User | #2
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
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"
Vladdy is offline   Reply With Quote
Old 09-20-2005, 05:47 PM   PM User | #3
BabySpidy
New Coder

 
Join Date: Sep 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
BabySpidy is an unknown quantity at this point
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..
BabySpidy is offline   Reply With Quote
Old 09-22-2005, 07:01 PM   PM User | #4
webgeo99
New to the CF scene

 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
webgeo99 is an unknown quantity at this point
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.
webgeo99 is offline   Reply With Quote
Old 09-22-2005, 08:34 PM   PM User | #5
KC-Luck
Regular Coder

 
Join Date: Aug 2005
Posts: 282
Thanks: 0
Thanked 0 Times in 0 Posts
KC-Luck is an unknown quantity at this point
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.
KC-Luck is offline   Reply With Quote
Old 09-23-2005, 03:14 AM   PM User | #6
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
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"
Vladdy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:52 PM.


Advertisement
Log in to turn off these ads.