473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

REQ: Help writing javascript tickertape.

I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.

What am I doing wrong here?

<http://www.sharemation.com/mark4asp/TickerTape.html>

Q: What is the setting in IE 6 such that the browser automatically
runs javascript without that nonsense asking the user whether they
want to allow 'blocked content'? Essentially I want to allways allow
'blocked content'.

Apr 1 '07 #1
5 1799
mark4asp said the following on 4/1/2007 5:36 PM:
I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.

What am I doing wrong here?
First thing you are doing is posting a URL to a page that requires a
Username/Password to view it.
<http://www.sharemation.com/mark4asp/TickerTape.html>

Q: What is the setting in IE 6 such that the browser automatically
runs javascript without that nonsense asking the user whether they
want to allow 'blocked content'? Essentially I want to allways allow
'blocked content'.
Tools>Internet Options>Advanced Tab>Allow Active Content

There are two boxes there to be checked, one is for the PC one is for
the CD Drive.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 1 '07 #2
On 1 Apr, 23:16, Randy Webb <HikksNotAtH...@aol.comwrote:
mark4asp said the following on 4/1/2007 5:36 PM:
I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.
What am I doing wrong here?

First thing you are doing is posting a URL to a page that requires a
Username/Password to view it.
<http://www.sharemation.com/mark4asp/TickerTape.html>
Q: What is the setting in IE 6 such that the browser automatically
runs javascript without that nonsense asking the user whether they
want to allow 'blocked content'? Essentially I want to allways allow
'blocked content'.

Tools>Internet Options>Advanced Tab>Allow Active Content

There are two boxes there to be checked, one is for the PC one is for
the CD Drive.
oops. Sorry about that. Here is the page below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Ticker Tape</title>
<script type="text/javascript">
var i, j
//default speed is 4.5 seconds
var speed = 4500
var news = ['Tue 11:10 - Blah Blah One','Tue 13:30 - Blah Blah
Two','Tue 14:55 - Blah Blah Three','Tue 17:30 - Blah Blah Four']
i = 0

function regenerate() {
window.location.reload()
}

function regenerate2() {
if (document.layers)
setTimeout("window.onresize = regenerate", 450)
}

function tick()
{
document.getElementById('subtickertape').innerHTML =
news[i].substr(0,j);
return;
}

function update() {
for(j=0; j <= news[i].length; j++)
{
window.setInterval('tick()', 1000);
}

if (i<news.length-1)
i++
else
i=0
setTimeout("update()",speed)
}

function init(){
// Ticker Tape
regenerate2();
update()
}

window.onload=init;

</script>
<style type="text/css">
#TickerTape
{
width:989px; max-width:1365px;
float:left; height:16px;
margin-left:0px; margin-top: 0px; margin-right:0px; margin-bottom:
4px;
padding-left:3px; padding-top:1px; padding-right:1px; padding-bottom:
1px;
background-color:#EBEBEF;
font-family: Verdana, Arial, sans-serif; font-size:7pt;font-
weight:bold;
line-height: 15px;
}
</style>
</head>
<body>
<table cellspacing="0" class="PageContainer">
<tr>
<td>Some banner</td>
</tr>
<tr>
<td id="TickerTape">
<span>Latest News: </span><span
id="subtickertape">Initializing...</span>
</td>
</tr>
<tr>
<td>Some content</td>
</tr>
</table>
</body>
</html>
Apr 2 '07 #3
mark4asp said the following on 4/2/2007 2:33 AM:
On 1 Apr, 23:16, Randy Webb <HikksNotAtH...@aol.comwrote:
>mark4asp said the following on 4/1/2007 5:36 PM:
>>I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.
<snip>

<marquee>Ticker Text Here</marquee>

Doesn't get much simpler than that. Let the browser manage it.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 3 '07 #4
On 3 Apr, 22:46, Randy Webb <HikksNotAtH...@aol.comwrote:
mark4asp said the following on 4/2/2007 2:33 AM:
On 1 Apr, 23:16, Randy Webb <HikksNotAtH...@aol.comwrote:
mark4asp said the following on 4/1/2007 5:36 PM:
>I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.

<snip>

<marquee>Ticker Text Here</marquee>

Doesn't get much simpler than that. Let the browser manage it.
Apologies - I don't want the scrolling (OK so I said 'scrolling' above
but I didn't mean it!).

I've been told I can get this effect by moving the RHS margin from
left to right to slowly reveal the text.

It should look as if each character is being typed on the screen to
the RHS of currently displayed characters.

Apr 4 '07 #5
mark4asp said the following on 4/4/2007 9:22 AM:
On 3 Apr, 22:46, Randy Webb <HikksNotAtH...@aol.comwrote:
>mark4asp said the following on 4/2/2007 2:33 AM:
>>On 1 Apr, 23:16, Randy Webb <HikksNotAtH...@aol.comwrote:
mark4asp said the following on 4/1/2007 5:36 PM:
I need a row of tickertape. Each character should appear on screen as
if it were being typed, so that the entire row is scrolled left to
right. Like a 'teletype' - I think they were called.
<snip>

<marquee>Ticker Text Here</marquee>

Doesn't get much simpler than that. Let the browser manage it.

Apologies - I don't want the scrolling (OK so I said 'scrolling' above
but I didn't mean it!).

I've been told I can get this effect by moving the RHS margin from
left to right to slowly reveal the text.

It should look as if each character is being typed on the screen to
the RHS of currently displayed characters.
There was a thread a few days ago about a typewriter script. You can
look into it. The one posted with a URL (other than mine) does what you
are talking about. When I think of a tickertape though (like a Stock
Exchange ticker) then it doesn't simply reveal the letters to the right,
it keeps typing in a fixed size and when the right side is reached the
letters scroll off the left side, much like the marquee tag does it.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dariusz | last post by:
I am a beginner in PHP and MySQL, and am working through a book and various online tutorials on PHP and MySQL and now stuck - installed everything on "localhost" and it all works fine. My question...
2
by: John F Dutcher | last post by:
Can anyone comment on why the code shown in the Python error is in some way incorrect...or is there a problem with Python on my hoster's site ?? The highlites don't seem to show here...but line...
8
by: Sue | last post by:
Hello! I am back with another question. Remember I am a new JavaScript student and I am aware that this code does not check for all the possibilities and that as a "NEW" JavaScript student I am...
8
by: Sue | last post by:
In this code why is it that when I press the SUBMIT button the focus only goes back to the Numeric field. What do I need to do to correct this problem? Sue <html>
5
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one...
0
by: swaroopa | last post by:
Hello Partner, Please forward some good resumes with excellent communication skills. J2EE CONSULTANT Exp: 4-6YEAR Location : Detroit, MI
1
by: swaroopa | last post by:
Hello Partner, Please forward some good resumes with excellent communication skills. Lotus Administrator Duration: 1 month Location: dayton OH Skills and Experience :
5
by: CartmanCreative | last post by:
I am totally new to Javascript, and would desperately like some help. I have downloaded a Javascript Text Scroller that uses DHTML to scroll text up and down. There are other Java scrollers that do...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.