Firefox help

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: May 2008
Posts: 3
Reputation: tattee is an unknown quantity at this point 
Solved Threads: 0
tattee tattee is offline Offline
Newbie Poster

Firefox help

 
0
  #1
May 23rd, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 62
Reputation: hooray is an unknown quantity at this point 
Solved Threads: 6
hooray hooray is offline Offline
Junior Poster in Training

Re: Firefox help

 
0
  #2
May 23rd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: tattee is an unknown quantity at this point 
Solved Threads: 0
tattee tattee is offline Offline
Newbie Poster

Re: Firefox help

 
0
  #3
May 23rd, 2008
no.. it bore no difference
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 62
Reputation: hooray is an unknown quantity at this point 
Solved Threads: 6
hooray hooray is offline Offline
Junior Poster in Training

Re: Firefox help

 
0
  #4
May 23rd, 2008
do you have javascript off in your firefox browser??
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 62
Reputation: hooray is an unknown quantity at this point 
Solved Threads: 6
hooray hooray is offline Offline
Junior Poster in Training

Re: Firefox help

 
0
  #5
May 23rd, 2008
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"
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: tattee is an unknown quantity at this point 
Solved Threads: 0
tattee tattee is offline Offline
Newbie Poster

Re: Firefox help

 
0
  #6
May 23rd, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 934 | Replies: 5
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC