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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlighter Scroller II-loading of ticker array dynamically errors out

    I plan to feed the contents of the ticker array from another window into a modal window which will display the ticker. I load the array with the correct href values and verify that the resulting strings mirror exactly would I would otherwise specify directly in the Highlighter code. I replace the “tickercontents[0]=” lines of code (for each element in the array) with some code to build the array as indicated. That’s the only change made to the above script.

    But when I create the array this way, then test by simply doing a document.write of one array value, I notice that the URL (when you mouse over the link) includes a full path to the working directory containing my other html files rather than just the URL that was built into the original array string (i.e. file:///C:/Documents%20and%20Settings/MyName/My%20Documents/HTML%20Files/www.google.com). So www.google.com is what is actually stored in the ticker contents array but running the Highlighter script then mousing over the link shows this long path. The script fails at “crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement” in the function start_ticking with an object required error. I notice the URL in the error message also has the long path as above but instead indicating a tmp file.

    Since the instructions for using this script indicate the area where the tickercontents array is assigned with values can be edited as long as the code following a certain point in the script is not modified, that implies to me that there is no reason I can’t construct the array values the way I have. That also suggests to me that the script is not precisely bug free since it is unable to handle this scenario without causing the above error. But then I'm a newbie Javascript writer.

    So any idea why?

    MJ

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    We can't determine what the problem is unless you give a link to the script. I assume it is this.

    http://www.javascriptkit.com/script/...hlight2.shtml?

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes. That's the one.

    MJ


  •  

    Posting Permissions

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