469,645 Members | 1,941 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Help with a marquee.

Hi I made this marquee program however, I am having trouble getting all four marquees to line up correctly. Basically I want the the 4 marquees to line up on the four sides exactly so they intersect. Three of them look good. With fourth the marquee does something funny this is illustrated if you change the border color of the "up" marquee in the program. Help and insights would be appreciated.
Here is the program, it is computationally expensive so it may take a few seconds to load.

Te code:


Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. //1. Draws the down marquee
  4. <marquee direction = "down" width = 45 height = 700 vspace="2" hspace="2" style="position:absolute; right: 2px; background: green; font-family:arial">
  5.  
  6.  
  7. <script type="text/javascript">
  8.  
  9. for (i = 39500; i <= 40000; i++)
  10. {
  11. document.write(String.fromCharCode(i).fontcolor("Blue").fontsize(16) );
  12. document.write("<br />");
  13.  
  14. }
  15. </script>
  16.  
  17.  
  18.  
  19.  
  20. </marquee>
  21.  
  22.  
  23. //2. Draws the right marquee
  24. <marquee direction = "right" width = 900 style="position:relative; left: 60px; background: green; font-family:arial">
  25.  
  26.  
  27. <script type="text/javascript">
  28.  
  29. for (i = 39500; i <= 40000; i++)
  30. {
  31. document.write(String.fromCharCode(i).fontcolor("Blue").fontsize(16) );
  32.  
  33. }
  34. </script> 
  35. </marquee>
  36.  
  37.  
  38.  
  39.  
  40. //3. Draws the up marquee the one giving me problems its border usurps the //window. Change color for illustartion
  41. <marquee direction="up" " " vspace="5" hspace="5" border-width: 3px align="left" width="45" height="500" style="font-size:12px;color:#000000;font-family:verdana;">
  42.  
  43. <script type="text/javascript">
  44.  
  45. for (i = 39500; i <= 40000; i++)
  46. {
  47. document.write(String.fromCharCode(i).fontcolor("Blue").fontsize(16) );
  48. document.write("<br />");
  49. }
  50. </script>
  51. </marquee>
  52.  
  53.  
  54.  
  55.  
  56.  
  57. <marquee direction = "left" width = 900 height = 45  align = "right" scrollamount = 5 background: green;
  58.   style= "background: red; border = 0; font-family:arial">
  59.  
  60.  
  61. <script type="text/javascript">
  62.  
  63. for (i = 39500; i <= 40000; i++)
  64. {
  65. document.write(String.fromCharCode(i).fontcolor("Blue").fontsize(16) );
  66.  
  67. }
  68. </script>
  69. </marquee>
  70.  
  71. <p align=center>Explanation:</p>
  72.  
  73. <p align=center>This is a marquee character loop starts with i=0.</p>
  74.  
  75.  
  76.  
  77.  
  78.  
  79. </body>
  80. </html>
Nov 2 '08 #1
3 2132
acoder
16,027 Expert Mod 8TB
The marquee tag is non-standard and not recommended.

However, I notice some extra quotes on line 41 which might cause some problems.
Nov 3 '08 #2
Thanks much. I notice you help a lot of people here.

I will try removing the quotes.

Is there a more standard way of doing a marquee in javascript?
Nov 4 '08 #3
acoder
16,027 Expert Mod 8TB
Not by using the marquee tag. You can, however, create a marquee effect using JavaScript only (style.left/style.top and setInterval, etc.)
Nov 4 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Jo_Calico | last post: by
6 posts views Thread by mike | last post: by
1 post views Thread by Sketcher | last post: by
5 posts views Thread by althafexcel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.