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 01-30-2005, 10:36 PM   PM User | #1
Fenrir
New to the CF scene

 
Join Date: Jan 2005
Location: Minneapolis
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Fenrir is an unknown quantity at this point
Script problems resulting from cleaning up code.

Recently I noticed while using a newer browser that a script I wrote doesn't work properly anymore. After throwing myself at the thing for the better part of a week, and using some new tools(jslint, firefox), I got the script active again, but it's not doing what it used to. Most frustrating is that I fixed a couple things with help from jslint, and was closer to what I originally had wanted as far as output, but after fixing all the problems, I seem to have stepped backwards.

In particular, I have a script that will randomly choose a lyric from a listing within the script, split the lyric into individual lines, fade in the line, fade it back out, then move down 1 line and display the next line. The script does this until the artist/title are displayed, then fades out and fades the entire text back in where each line was displayed the first time, and then stops.

This used to work well in IE 5.x, but now I can only get the first line to display and then everything is blank. Before I fixed all the errors jslint told me about, I was getting each line displayed on the same line one after the next, then the entire lyric displayed correctly. I'm confused as to why this is happening and why after fixing "errors" it no longer will display past the first line.

It's extremely frustrating to see the script apparently working, yet not doing what it's supposed to, despite limited fixing(i.e. brackets for inline if statements, use of === for 0 eval etc.). The code itself hasn't changed at all, so I'm wondering why the browsers are not displaying it as they used to. Is there something w/ the document.foo notation that changed so I need to update my calls, or is this just totally impossible to figure out w/o the code?

I apologize for my somewhat limited knowledge right now. I taught myself javascript over a summer(by fixing up this script to do what I wanted), and I obviously didn't learn enough

Fenrir
Fenrir is offline   Reply With Quote
Old 01-30-2005, 11:51 PM   PM User | #2
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
It's hard help without seeing the code.
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 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 12:46 PM.


Advertisement
Log in to turn off these ads.