HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 3rd, 2003, 09:13 AM
szms szms is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 44 szms User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
How to show the information on the status bar

Hi there...

I am trying to show my information on the status bar with the following code.

Code:

<body onLoad="startStatusScroller();"> 
<script language="JavaScript"> 
<!-- 
// You may edit the message below. 
var statBarMsg = "Welcome To My Website............." + 
                 "" + "..................................................  ............" ; 

function startStatusScroller() 
{ 
    window.status = statBarMsg; 
    statBarMsg = statBarMsg.substring(1, statBarMsg.length) + statBarMsg.substring(0, 1) 
    setTimeout("startStatusScroller()", 150) 
}//--> 
</SCRIPT> 





Now I have another java script code for getting date and time. Here is the sinppet,

Code:


<SCRIPT LANGUAGE="JavaScript"> 
<!-- Begin 
var day=""; 
var month=""; 
var myweekday=""; 
var year=""; 
newdate = new Date(); 
mydate = new Date(); 
dston =  new Date('April 4, 1999 2:59:59'); 
dstoff = new Date('october 31, 1999 2:59:59'); 
var myzone = newdate.getTimezoneOffset(); 
newtime=newdate.getTime(); 

var zone = 6;  // references your time zone 

if (newdate > dston && newdate < dstoff ) { 
zonea = zone - 1 ; 
dst = "  Pacific Daylight Savings Time"; 
} 
else { 
zonea = zone ; dst = "  Pacific Standard Time"; 
} 
var newzone = (zonea*60*60*1000); 
newtimea = newtime+(myzone*60*1000)-newzone; 
mydate.setTime(newtimea); 
myday = mydate.getDay(); 
mymonth = mydate.getMonth(); 
myweekday= mydate.getDate(); 
myyear= mydate.getYear(); 
year = myyear; 

if (year < 2000)    // Y2K Fix, Isaac Powell 
year = year + 1900; // http://onyx.idbsu.edu/~ipowell 
myhours = mydate.getHours(); 
if (myhours >= 12) { 
myhours = (myhours == 12) ? 12 : myhours - 12; mm = " PM"; 
} 
else { 
myhours = (myhours == 0) ? 12 : myhours; mm = " AM"; 
} 
myminutes = mydate.getMinutes(); 
if (myminutes < 10){ 
mytime = ":0" + myminutes; 
} 
else { 
mytime = ":" + myminutes; 
}; 
arday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") 
armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ") 
ardate = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st"); 
// rename locale as needed. 

var time = ("In Dallas, Texas, it is: " + myhours + mytime+ mm + ", " + arday[myday] +", " + armonth[mymonth] +" "+ardate[myweekday] + ", " + year+", " + dst +"."); 
document.write(time); 
//--> 
</SCRIPT> 



Now I want to add the date and time information on my status bar along with other information. Could you please let me know how to do that?

Reply With Quote
  #2  
Old October 31st, 2003, 01:42 PM
sferdeanoana sferdeanoana is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Timisoara,Romania
Posts: 8 sferdeanoana User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to sferdeanoana
hY,
You should make a function for the recording date, time...and you should put the result to
window.status = statBarMsg+functionname()
Have a nice day,
Oana.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > How to show the information on the status bar


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway