Forums

Forums (http://www.abandonia.com/vbullet/index.php)
-   Programming (http://www.abandonia.com/vbullet/forumdisplay.php?f=25)
-   -   Html Calendar (http://www.abandonia.com/vbullet/showthread.php?t=12241)

Nick 09-10-2006 10:11 AM

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

[attachmentid=3738]

Rinforzando 14-10-2006 04:52 PM

[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.

Nick 15-10-2006 07:54 AM

Thanks!


The current time is 10:12 PM (GMT)

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