I'm making a site for a client at the moment. As usual, I'm making most of the HTML simple so everyday updates can be done by an inexperienced webmaster, but I couldn't make the interactive calendar simple. The ones I found online were either not for free (client has a small budget) or couldn't be embedded into a page at all.
So instead I'm programming a code generator, the webmaster is provided with links to select parameters, and as they change them the code is updated to match. This part of the script works like a charm, but the preview function doesn't work at all. That generator would be easy and convenient enough for an experienced user, but without the preview function a noob will weep.
This is the code generator:
http://membre.megaquebec.net/youma/fadoq-temporaire/generateur.htmlSo you can see it along with the source.
These two lines do nothing:
if (document.getElementById) document.getElementById("grillage").innerHTML = contenu;
if (document.all) grillage.innerHTML = contenu;
They don't cause any bug, and if I replace the variable with a fixed value it doesn't work any better. They just seem inert. I don't see anything wrong with them though, and if I replace them with an alert to see if the program even reads at that point, well the alert works. Anybody sees something else on the page that might stop them from working?
Edit: I found the problem, it's because the code ordered to add <TD> tags into a previously written table, and HTML did not like that one bit. So I removed the table code from the HTML and added it to the script instead. HTML doesn't want messing with a table's structure dynamically, but it has no issue with rebuilding it entirely.