javascript in nested tables

The ‘remember info’ checkbox on my comment pages didn’t work in Opera. I would type in my name and URL, check the ‘remember info’ box and when I returned, the information was gone. I surmised that Opera didn’t support the Javascript being used to store the cookies. Later, I discovered a web site using a Movable Type template that saved my information in Opera. My quest to figure out why mine didn’t work began. I compared the code on the working site with my site. Identical. Three hours later, I discovered the reason.

The javascript code that retrieves the cookies and populates the fields was not being called on my site because it was within a nested table. This is a known bug on Netscape 4 but apparently it’s an issue in Opera too.

I moved the javascript code outside of the tables and it now works, unless you reload the page. For some reason reload doesn’t run any javascript unless it’s in the <body>’s onLoad() function. I don’t imagine too many people will reload the page. At least I no longer have to type in my name and URL every time I make a comment.


 (Post a comment) | Comments RSS feed
  1. Interestingly, after making changes, mine worked for a day and then stopped. I’ve had no time to look at it.

    Comment by Cameron on March 28, 2003 @ 2:40 pm
  2. I noticed it wasn’t working.

    Comment by dan on March 28, 2003 @ 2:43 pm

Comments are closed