|
|
 |
BOOK: Beginning JavaScript  | This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning JavaScript section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 21st, 2009, 10:35 AM
|
|
Registered User
|
|
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Scrolling status bar
The code for scrolling status bar in chapter 9 didn't work. please help me with a working code.
|

October 22nd, 2009, 07:35 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
|
|
Most of us won't have that beginner's book. If you want help with the code, then show the code.
|

October 23rd, 2009, 07:17 AM
|
|
Registered User
|
|
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Scrolling status bar
Thanks Old pedant .I tried it but it didn't work. here is the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
var message = "Beginning JavaScript from Wrox Press";
var startChar = 0;
var maxLength;
function window_onload()
{
var availWidth = 0;
var spaces = "";
if (typeof window.innerWidth != 'undefined')
{
availWidth = window.innerWidth / 10;
}
else
{
availWidth = document.body.scrollWidth / 10;
}
while (availWidth > 0)
{
spaces = spaces + " ";
availWidth--;
}
message = spaces + message;
maxLength = message.length - 1;
setInterval("scrollMessage()",65);
}
function scrollMessage()
{
window.status = message.substring(startChar);
startChar++;
if (startChar == maxLength)
{
startChar = 0;
}
}
</SCRIPT>
</HEAD>
<BODY LANGUAGE=JavaScript onload="return window_onload()">
<P>Scrolling Status Bar Example</P>
</BODY>
</HTML>
|

October 23rd, 2009, 04:38 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
|
|
It works fine in MSIE.
Chrome doesn't have a status bar, and FireFox blocks changes to window.status by default (the user must change permissions to allow it to be used). It's a very very old script, so I would guess it only works in MSIE and old versions of Netscape Navigator.
|

October 23rd, 2009, 05:23 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
|
|
Yeah, it says that edition of the book is from year 2000. FireFox and Chrome weren't even close to existing back then. It was intended for MSIE 4 and Netscape 4. You're going to encounter some pretty old and creaky code in that book, so take it with a grain of salt. *PROBABLY* you will find the most compatiblity with MSIE. MSIE version 7 still supports most all the stuff the MSIE 4 did, but you can't say that about most other browsers. I know, I know...you hate MSIE. Hard to blame you, but if you use that book you might not have a better choice.
|

October 29th, 2009, 01:17 PM
|
|
Registered User
|
|
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Scrolling status bar
Thanks a lot Old pedant.
Pls, can you help me with the scrolling text code that works with Firefox or that is cross-browser.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| scrolling bar for a webpart |
mahesh_sharepoint |
SharePoint Development |
2 |
April 22nd, 2009 04:24 PM |
| Status Bar |
ironchef |
Java GUI |
0 |
October 26th, 2006 10:19 PM |
| Scrolling Status Bar Text |
MikeySH |
BOOK: Beginning JavaScript 2nd Edition |
0 |
July 19th, 2005 01:53 AM |
| Change Status bar |
qazi_nomi |
HTML Code Clinic |
1 |
July 10th, 2004 05:28 PM |
| Status Bar |
soccers_guy10 |
Pro VB.NET 2002/2003 |
3 |
August 13th, 2003 12:48 AM |
|
 |