471,863 Members | 1,211 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,863 software developers and data experts.

Having trouble getting marquee to work: getting Object Required errors

having trouble getting marquee to work get object required errors

tring t [HTML]<title>This Month at the Chamberlain Civic Center</title>
<link href="styles.css" rel="stylesheet" type="text/css" />

<script src="Dunbarlab9.js" type="text/javascript"></script>

<script type="text/javascript">

function Marquee(){
var t1 = setInterval('moveIt("Text1")',130);

var y=yCoord (t1);

shiftIt("t1", 0,-5);

var t2 = setInterval('moveIt("Text2")',130);

var y=yCoord (t2);

shiftIt("t2", 0,-5);


function Stop(){

function moveIt(id){
var y=yCoord (id);
if (y < -100){

if (y >= -100){
shiftIt("id", 0,-5);}


<div id="panel">
<img src="ccc.gif" alt="The Chamberlain Civic Center" width="322" height="134" />
Events This Month
To order tickets: Call the box office at (971) 555-9191<br />
Or click <a href="#">here</a> to order online.
<div id="BOX">
<div id="Text1" style="position: absolute; left: 0px; top: 5px">
Coming Soon to the CCC
<div id="Text2" style="position: absolute; left: 0px; top: 50px">
<b>October 2nd, 8 p.m.<br />
Falstaff</b><hr />
Enjoy the music of Verdi's <i>Falstaff</i>, as presented by the popular Rockie Mountain
Opera Company. Seating is limited.<br />
<br />
Tickets: Box ($55), Main Floor ($45), Balcony ($35)
<div id="Text3" style="position: absolute; left: 0px; top: 200px">
<b>October 7th, 8 p.m.<br />
Taiwan Acrobats</b><hr />
The Taiwan Acrobats return to the Carson Civic Center for another evening of fun
and excitment.<br />
<br />
Tickets: Box ($40), Main Floor ($35), Balcony ($30)
<div id="Text4" style="position: absolute; left: 0px; top: 350px">
<b>October 14th, 8 & 10 p.m.<br />
Roy Taylor</b><hr />
Enjoy of the blues sound of the legendary "Slow Train" Taylor. Two performances
at 8 and 10 p.m.<br />
<br />
Tickets: Box ($40), Main Floor ($35), Balcony ($30)
<div id="Text5" style="position: absolute; left: 0px; top: 500px">
<b>October 21st, 8 p.m.<br />
Celtic Dancers</b><hr />
Enjoy an evening of Celtic music and dance, as presented by the Oban Dance Company
of Scotland.<br />
<br />
Tickets: Box ($30), Main Floor ($25), Balcony ($20)
<div id="Text6" style="position: absolute; left: 0px; top: 650px">
<b>October 28th, 8 p.m.<br />
An Evening with Ike</b><hr />
David Lee presents <i>An Evening with Ike</i>, his acclaimed one-man show of the
life and times of Dwight Eisenhower.<br />
<br />
Tickets: Box ($35), Main Floor ($30), Balcony ($25)
<div id="form_buttons">
<form id="marquee_buttons" action="">
<input type="button" value="Scroll Marquee" onclick="Marquee()" />
<input type="button" value="Stop Marquee" onclick="Stop()" />
<input type="button" value="Reset" onclick="location.reload()" />
</html>[/HTML]o make this marquee work here is the html and js

Expand|Select|Wrap|Line Numbers
  1. function placeIt(id, x, y){
  2. object=document.getElementById(id);
  3. object.style.left=x+"px";
  4. object.style.top=y+"px";
  5. }
  7. function shiftIt(id, dx, dy) {
  8. object=document.getElementById(id);
  9. object.style.left=xCoord(id)+dx+"px";
  10. object.style.top=yCoord(id)+dy+"px";
  11. }
  12. function yCoord(id) {
  13. object=document.getElementById(id);
  14. yCoord=parseInt(object.style.top);
  15. return yCoord;
  17. }
  18. function xCoord(id){
  19. object=document.getElementById(id);
  20. var xc=parseInt(object.style.top);
  21. return xc;
  22. }
Apr 6 '08 #1
1 2553
16,027 Expert Mod 8TB
What line does the error occur on?

PS. please use [code] tags when posting code and please use a good title for your threads.
Apr 7 '08 #2

Post your reply

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

Similar topics

9 posts views Thread by Penn Markham | last post: by
15 posts views Thread by charlie fortune | last post: by
2 posts views Thread by somersbar | last post: by
4 posts views Thread by uwe.braunholz | last post: by
2 posts views Thread by tony | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.