I have a new problem though.
I have a simple form that uses selection boxes and I wanted the boxes to be smart. As I have said before, I do not have access to the server side system so I have to add the smarts on the client side.
it is simple, month day year.
I have the months set as static HTML with values from 0 to 11 accordingly. I have set the page to run my "fillDay()" function onload, which proceeds to properly fill in the correct number of days for the month.... January being the one that is set at the start.
The "Days" select box is populated through appendChild() calls. The problem arises when I go to change the month. when fillDay runs again, it continues to append to the initial list rather than simple replace the items.
I have tried code that should remove the child nodes first:
Expand|Select|Wrap|Line Numbers
- while(slctDay.hasChildNodes()){
- slctDay.removeChild(slctDay.firstChild);
What can I do to remedy this? is there a way to reload a single element on the page?
Thanks,
Jeremy