robinski
asked on
Beginner with Java
Greetings To All
===========
I have copied a java script to my FP web page. It is supposed to show today's date. It does not increment. I obviously need something else.
Where can I learn "First Steps With Java"?
Thanks,
robinski
===========
I have copied a java script to my FP web page. It is supposed to show today's date. It does not increment. I obviously need something else.
Where can I learn "First Steps With Java"?
Thanks,
robinski
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cdbasic,
Thanks. I tried and I get the error message:
Line 32
Char 80
Unterminated string comstant.
The page with my attempt is at:
www.vicnet.net.au/~ri9790/clubs/dcreek/
This does not give an erro message but also does not work.
Cheers
robinski
Thanks. I tried and I get the error message:
Line 32
Char 80
Unterminated string comstant.
The page with my attempt is at:
www.vicnet.net.au/~ri9790/clubs/dcreek/
This does not give an erro message but also does not work.
Cheers
robinski
What is the link to the page that has the code I provided?
Clyde
Clyde
ASKER
I have only run that on my PWS server
ASKER
Well now this might be more like the format you are looking for.
<SCRIPT LANGUAGE="Javascript">
<!--
// Array of day names
var dayNames = new Array( "Sunday","Monday","Tuesday ","Wednesd ay","Thurs day","Frid ay","Satur day");
// Array of month Names
var monthNames = new Array( "January","February","Marc h","April" ,"May","Ju ne","July" ,"August", "September ","October ","Novembe r","Decemb er");
var now = new Date();
document.write(dayNames[no w.getDay() ] + ", " + monthNames[now.getMonth()] + " " + now.getDate() + ", 19" + now.getYear());
// -->
</SCRIPT>
I did a local test OK.
Enjoy
Clyde
<SCRIPT LANGUAGE="Javascript">
<!--
// Array of day names
var dayNames = new Array( "Sunday","Monday","Tuesday
// Array of month Names
var monthNames = new Array( "January","February","Marc
var now = new Date();
document.write(dayNames[no
// -->
</SCRIPT>
I did a local test OK.
Enjoy
Clyde
ASKER
Clyde,
Yes that is better. Many thanks.
What was wrong with the original?
robinski.
Yes that is better. Many thanks.
What was wrong with the original?
robinski.
I don't know it works on my site OK.
Maybe the ghost of christmas past. ;>)
Enjoy the day,
Clyde
Maybe the ghost of christmas past. ;>)
Enjoy the day,
Clyde
ASKER
Greetings To All
===========
Your code worked until the year end. Now it does not translate the year correctly.
I can edit the script in FP2000 and the preview shows correctly but does not display from the web.
Should I make this another question?
robinski
===========
Your code worked until the year end. Now it does not translate the year correctly.
I can edit the script in FP2000 and the preview shows correctly but does not display from the web.
Should I make this another question?
robinski
Howdy robinski,
Send the URL so I can look at the source.
Clyde
Send the URL so I can look at the source.
Clyde
ASKER
Greetings Clyde,
The code is yours from above.
This one has the original:
http://www.vicnet.net.au/~ri9790/clubs/kilmore/
and I have cheated with this one:
http://www.vicnet.net.au/~iwda61/
Thanks for your help and best wishes for the final year of the 20th century
robinski
The code is yours from above.
This one has the original:
http://www.vicnet.net.au/~ri9790/clubs/kilmore/
and I have cheated with this one:
http://www.vicnet.net.au/~iwda61/
Thanks for your help and best wishes for the final year of the 20th century
robinski
Howdy,
This is what I see on your page.
"Last Updated Saturday, January 1, 192000 "
This is your source
document.write(dayNames[no w.getDay() ] + ", " + monthNames[now.getMonth()] + " " + now.getDate() + ", 19" + now.getYear());
Get rid of the *19* and remove the line break between the *19* and the *+* that should take care of it.
This is how the line should look.
document.write(dayNames[no w.getDay() ] + ", " + monthNames[now.getMonth()] + " " + now.getDate() + ", " + now.getYear());
Enjoy,
Clyde
This is what I see on your page.
"Last Updated Saturday, January 1, 192000 "
This is your source
document.write(dayNames[no
Get rid of the *19* and remove the line break between the *19* and the *+* that should take care of it.
This is how the line should look.
document.write(dayNames[no
Enjoy,
Clyde
ASKER
Clyde,
I tried this on:
http://www.vicnet.net.au/~ri9790/
Year now shows as 100.
Oh dear! <G>
robinski
I tried this on:
http://www.vicnet.net.au/~ri9790/
Year now shows as 100.
Oh dear! <G>
robinski
Must be the Y2K bug on your end. ;>)
This is what I see.
Last xx Updated Sunday, January 2, 2000
Go here http://www.cbasic.com/tips/date.htm & let me know what you see.
I copy/pasted your code to this page.
Clyde
This is what I see.
Last xx Updated Sunday, January 2, 2000
Go here http://www.cbasic.com/tips/date.htm & let me know what you see.
I copy/pasted your code to this page.
Clyde
BTW,
This script runs on the client side. So it is dependent upon the clients system date. Check your system date. What does it say? Are you Y2K compliant? ;>)
Clyde
This script runs on the client side. So it is dependent upon the clients system date. Check your system date. What does it say? Are you Y2K compliant? ;>)
Clyde
ASKER
Clyde,
Yes I am compliant. My FP editor shows 2000 and your page shows:
Date Test
Monday, January 3, 100
The provider is our State government. We get free space as a community service group.
I also notice that the file date on my FTP client is:
1000103
Is this the culprit?
robinski
Yes I am compliant. My FP editor shows 2000 and your page shows:
Date Test
Monday, January 3, 100
The provider is our State government. We get free space as a community service group.
I also notice that the file date on my FTP client is:
1000103
Is this the culprit?
robinski
Well Robin,
Sure looks like it. Have a friend from another ISP take a look at your page and find out what they see.
Welcome to computing. ;>)
Clyde
Sure looks like it. Have a friend from another ISP take a look at your page and find out what they see.
Welcome to computing. ;>)
Clyde
Robin,
I just view your page from a different ISP and the date is being displayed correctly.
Enjoy,
Clyde
I just view your page from a different ISP and the date is being displayed correctly.
Enjoy,
Clyde
ASKER
Clyde,
Did you check the code?
I have added a fixed 2000 over a period of a few hours to most of the site.
I have not yet touched the PRPapers directory so this URL is showing "100" with me.
http://www.vicnet.net.au/~ri9790/district/prpapers/GSEgen.htm
Thanks for taking the interest.
robinski
Did you check the code?
I have added a fixed 2000 over a period of a few hours to most of the site.
I have not yet touched the PRPapers directory so this URL is showing "100" with me.
http://www.vicnet.net.au/~ri9790/district/prpapers/GSEgen.htm
Thanks for taking the interest.
robinski
Did you have a friend from another ISP view the page?
The code is correct, The way it's being displayed at your end is the problem. JavaScripts are client/browser dependent.
Take care and best wishes,
Clyde
The code is correct, The way it's being displayed at your end is the problem. JavaScripts are client/browser dependent.
Take care and best wishes,
Clyde
This is a good place to start looking for a book on JavaScript.
http://www.wrox.com/Consumer/Store/ListTitles.asp?By=105&Category=Consumer
Clyde