943,733 Members | Top Members by Rank

Ad:
May 23rd, 2008
0

Firefox help

Expand Post »
Can some please help me with this script.. it will not show the scrolling text in firefox browsers..

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. /*
  5. Typing Scroller
  6. */
  7.  
  8. //Secify scroller contents
  9. var line=new Array()
  10. line[1]="This is an awsome script"
  11. line[2]="It brings up the text you want..."
  12. line[3]="One letter at a time"
  13. line[4]="You can add and subtract lines as you like."
  14. line[5]="It\'s very cool and easy to use"
  15.  
  16. //Specify font size for scoller
  17. var ts_fontsize="16px"
  18.  
  19. //--Don't edit below this line
  20.  
  21. var longestmessage=1
  22. for (i=2;i<line.length;i++){
  23. if (line[i].length>line[longestmessage].length)
  24. longestmessage=i
  25. }
  26.  
  27. //Auto set scroller width
  28. var tscroller_width=line[longestmessage].length
  29.  
  30. lines=line.length-1 //--Number of lines
  31.  
  32. //if IE 4+ or NS6
  33. if (document.all||document.getElementById){
  34. document.write('<form name="bannerform">')
  35. document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
  36. document.write(' style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
  37. document.write('</form>')
  38. }
  39.  
  40. temp=""
  41. nextchar=-1;
  42. nextline=1;
  43. cursor="\\"
  44. function animate(){
  45. if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
  46. nextline++;
  47. nextchar=-1;
  48. document.bannerform.banner.value=temp;
  49. temp="";
  50. setTimeout("nextstep()",1000)}
  51. else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
  52. nextline=1;
  53. nextchar=-1;
  54. document.bannerform.banner.value=temp;
  55. temp="";
  56. setTimeout("nextstep()",1000)}
  57. else{
  58. nextstep()}}
  59.  
  60. function nextstep(){
  61.  
  62. if (cursor=="\\"){
  63. cursor="|"}
  64. else if (cursor=="|"){
  65. cursor="/"}
  66. else if (cursor=="/"){
  67. cursor="-"}
  68. else if (cursor=="-"){
  69. cursor="\\"}
  70.  
  71.  
  72. nextchar++;
  73. temp+=line[nextline].charAt(nextchar);
  74. document.bannerform.banner.value=temp+cursor
  75. setTimeout("animate()",25)}
  76.  
  77. //if IE 4+ or NS6
  78. if (document.all||document.getElementById)
  79. window.onload=animate
  80. // -->
  81. </script>
Last edited by tattee; May 23rd, 2008 at 3:35 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tattee is offline Offline
3 posts
since May 2008
May 23rd, 2008
0

Re: Firefox help

dude, you have comment tags around the whole thing <!-- ...... -->
I don't know if that might change anything by taking those out, but try it and see
Reputation Points: 11
Solved Threads: 6
Junior Poster in Training
hooray is offline Offline
62 posts
since Jan 2008
May 23rd, 2008
0

Re: Firefox help

no.. it bore no difference
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tattee is offline Offline
3 posts
since May 2008
May 23rd, 2008
0

Re: Firefox help

do you have javascript off in your firefox browser??
Reputation Points: 11
Solved Threads: 6
Junior Poster in Training
hooray is offline Offline
62 posts
since Jan 2008
May 23rd, 2008
0

Re: Firefox help

actually its not working in ie as far as I can tell, not just firefox. it gives just this:

<input type="text" name="banner" size="43"
Reputation Points: 11
Solved Threads: 6
Junior Poster in Training
hooray is offline Offline
62 posts
since Jan 2008
May 23rd, 2008
0

Re: Firefox help

its working fine on my site in ie.. I have it implemented into an index page of integramod.. I've been doing a little testing.. seems to be a var in the php coding.. it works on its own in a html doc.. here it is here in action.. WORKS IN FIREFOX NOW

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. http://www.magicalweb.org/index12.html
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tattee is offline Offline
3 posts
since May 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: get element ID using value
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC