Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 09-10-2006, 10:11 AM   #1
Nick
Переводчик помаленьку
 
Nick's Avatar

 
Join Date: Dec 2004
Location: Protvino, Russian Federation
Posts: 340
Send a message via ICQ to Nick Send a message via Skype™ to Nick
Default

I can't find error. I looked in similar program, but I don't know, what I am doing wrong.

[attachmentid=3738]
__________________
"Paladin work is never done..."


Nick is offline                         Send a private message to Nick
Reply With Quote
Old 14-10-2006, 04:52 PM   #2
Rinforzando
Forum hobbit

 
Join Date: Jun 2005
Location: Bicester, England
Posts: 45
Default

[attachmentid=3762]
Voila! I think I have solved your problems. I would have prefered to have explained to you what you needed to do, but it seemed easier to just do it. I'll quickly go through the changes I've made.
  1. Once you have clicked a button, the script no longer existed in the document. To solve this I moved it into an external file called "calendar.js"
  2. Now that the script was in a separate file, the button functions could not access the date variables. I added a "(d, m, y)" interface to the functions to get around this. I also moved the date commands near the start of the script into a new function called "GetStartDate()". This was to prevent the variables being accidentaly overwritten.
  3. The buttons now work, but the new content is written underneath the old when you click on one. Putting "document.open()" commands before writing the calendar clears the page.
Apart from that the script was fine. I only changed the "write()" commands to "writeln()" to make the generated source code look neater. Hope that helps. PM me if you have any questions.
__________________
Let teh phantasy rule your mind
Rinforzando is offline                         Send a private message to Rinforzando
Reply With Quote
Old 15-10-2006, 07:54 AM   #3
Nick
Переводчик помаленьку
 
Nick's Avatar

 
Join Date: Dec 2004
Location: Protvino, Russian Federation
Posts: 340
Send a message via ICQ to Nick Send a message via Skype™ to Nick
Default

Thanks!
__________________
"Paladin work is never done..."


Nick is offline                         Send a private message to Nick
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
why doesn't it show birthdays from calendar? _r.u.s.s. Old Suggestions 7 14-06-2009 09:20 AM
Calendar The Fifth Horseman Old Suggestions 17 21-06-2006 12:15 PM
More Html Help Bobbin Threadbare Tech Corner 29 14-03-2006 02:33 PM
Html Scroll To: Bobbin Threadbare Tech Corner 2 28-02-2006 05:48 AM
2006 Calendar vipin Blah, blah, blah... 17 04-01-2006 08:04 AM


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 04:46 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.