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 to the CF scene
    Join Date
    Jan 2005
    Location
    Minneapolis
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    It's hard help without seeing the code.


  •  

    Posting Permissions

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