www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: JS NewsTicker not working in IE8

  1. #1
    Join Date
    May 2010
    Posts
    10

    Unhappy JS NewsTicker not working in IE8

    Hi Guys,

    First of all, just wanted to say hi to everyone in this forum. I am here for the first time and I don't know how to write or modify javascript. I was hoping someone could help me with this small issue I encountered while designing page for a client. I tried everything, first sorting it myself, then asking friends and now I would like to post this question on the forum. I am sure there is some small mistake on my end on how I applied the code, or maybe some syntax error in the code itself that can't execute in IE8.

    Have a look at this page:

    http://www.sgnwsk.com/dropbox/Strona3/

    Under "Zaufali mi" there is an embedded javascript news ticker that works in all browsers (IE7, FF, Chrome, Safari etc) but not in IE8

    Here is the link to javascript:

    http://www.sgnwsk.com/dropbox/Strona...bticker_lib.js

    Thanks all, any input is much appreciated!

    Regards,

    Michael

  2. #2
    Join Date
    May 2010
    Posts
    213
    I cannot help you as I don't have IE8, but I believe this can help you. Especially the part where they say:
    CSS Expressions are NO LONGER allowed (deprecated)
    i love easter eggs
    (if you got any creative easter eggs, send me a PM)

  3. #3
    Join Date
    May 2010
    Posts
    10

    thx mate

    Thanks for that mate. I read through. Very complicated and heavy subject for me, not sure if I know how to fix it with their info, but your lead is much appreciated...

  4. #4
    Join Date
    May 2010
    Posts
    213
    Here's another thought. You have a TICKER_WIDTH variable in the script that is undefined. Remove the code:
    Code:
    TICKER_WIDTH = document.getElementById("TICKER").style.width;
    	var img = ""+TICKER_WIDTH+"";
    And all uses of the img variables:
    Code:
    "+img+"
    (there's four occurances)
    i love easter eggs
    (if you got any creative easter eggs, send me a PM)

  5. #5
    Join Date
    May 2010
    Posts
    10
    Hey,

    I deleted the specified line + "+img+" with quotes (if I left the quotes the applet would stop working everywhere). But yeah, it works in IE7 ff safari etc, but still doesn't work in IE8 :{

    But thanks for our suggestion..

    Cheers,

    Mike

  6. #6
    Join Date
    May 2010
    Posts
    2
    hey, on getting the width (TICKER), the IE8 includes "px" (6 px) also. So that is undefined.

    you can use this

    var mydiv = document.getElementById("TICKER");
    var img = mydiv.style.width = 5 +"px";


    Replace 5 with any other. The script you are using in the site is not working with opera also. Check it.

  7. #7
    Join Date
    May 2010
    Posts
    10
    Hey Vignes92

    Just did what you have recommended.

    Still doesn't work in IE8.

    I have updated the files with my recent changes (script to be exact), so you can track the changes. Not sure what is causing it, as I said before - I don't know what might be causing it to ignore the script in IE8, but it looks like some security measures as suggested by a different user who wrote in this thread.

    http://www.sgnwsk.com/dropbox/Strona3/

  8. #8
    Join Date
    May 2010
    Posts
    10
    ...and yes, it doesn't work in Opera either, crap :[

    Just downloaded Opera for mac and it doesn't even show up.

    Hmm.. wonder what would be the issue with those whole applet thingy :/

    Cheers dudes

  9. #9
    Join Date
    May 2010
    Posts
    213
    Check this out and tell me if it works in IE8 (since I can't check myself)
    i love easter eggs
    (if you got any creative easter eggs, send me a PM)

  10. #10
    Join Date
    May 2010
    Posts
    10
    3nex, mate you rock. Yes it works now (even in Opera!) This is awesome. Thanks for fixing this for me, much appriciated. Can I ask you what have you modified? is it just the js? or should I apply some html changes.

    Big thanks

    sgnwsk

  11. #11
    Join Date
    May 2010
    Posts
    10
    it stopped repeating now though

    update: so it works, but when the cycle is finished it doesn't cycle through again, repeat itself..
    Last edited by sgnwsk; 05-09-2010 at 06:59 AM. Reason: updated info

  12. #12
    Join Date
    May 2010
    Posts
    213
    Quote Originally Posted by sgnwsk View Post
    it stopped repeating now though
    I know that, I just meant to ask if this worked in IE8. I can get that fixed in a moment so you can just copy paste that crap.

    I did make some HTML changes too, because I've noticed that your script replaces some HTML which was redundant, so I just applied those changes right away to avoid too much javascript text replacing. And I gotta tell you your code seems kind of Dreamweavery... Am I right about that?
    i love easter eggs
    (if you got any creative easter eggs, send me a PM)

  13. #13
    Join Date
    May 2010
    Posts
    10
    yes on "repeating". That is exactly what I mean.. It was working before until you modified it (hey no offense, just saying). Sorry I don't want you to sort anything out in a seconds, all I am asking for is a bid of hand. And yes again, my code is totally "dreamweavery: as I am not getting paid for that crap and I just want to get thing out asap. But thanks for your input mate. I must have deleted some code from that html or applet at the beginning as I was trying to get this thing to work, so there must be some syntax error caused by my dev.

  14. #14
    Join Date
    May 2010
    Posts
    213
    So, now I've done the repeating too, you can check the updated version and you're all set.

    Quote Originally Posted by sgnwsk View Post
    I don't want you to sort anything out in a seconds, all I am asking for is a bid of hand
    I'm not sure what you meant by this
    i love easter eggs
    (if you got any creative easter eggs, send me a PM)

  15. #15
    Join Date
    May 2010
    Posts
    10
    Thanks a lot mate. Look, don't worry on what I have wrote. Must have been mis-communication. It looked too me like you are angry on me for what I have wrote or something doesn't matter. I appreciate your help. I have copied the html + js from your examples, so I am all set indeed. Thx again man, I will look into everything tomorrow and compare what changes you have done, so I can remember for the future but it is getting late now and I am done for today.

    Big thanks,

    Mike

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles