p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 21st, 2009, 10:35 AM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Scrolling status bar

The code for scrolling status bar in chapter 9 didn't work. please help me with a working code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 22nd, 2009, 07:35 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
Default

Most of us won't have that beginner's book. If you want help with the code, then show the code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 23rd, 2009, 07:17 AM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old October 23rd, 2009, 04:38 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old October 23rd, 2009, 05:23 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old October 29th, 2009, 01:17 PM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 01:14 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc