document.writeln allow?

2 posts / 0 new
Last post

hello,
before starting to venture in epu3 I would understand if I take the right path.
I thought that I could take my js and copy it into my EPUB3, but it is not.
the simple document.writeln fails and returns an error.
I understand then that I can not use the document. as I want, but there are limits that prevent you from doing the ebook.
so I'll have to change all my js
eg
document.writeln ("<table border = 0> <tr> <td> <FORM name = BoardForm> <table border = 0> <tr> <td>");
....
it is right?

thanks

First note, that you have to ensure, that all content is accessible without script interpretation is activated or available - therefore it is questionable why there is a need to add content at all with such a construction.
Yours scripts cannot change the content of your book by definition, but it might change the impression for users having script interpretation activated.
For both groups you have to provide the same content per requirement.

Second note, that you try to manipulate XML documents, no HTML tag soup, therefore well defined DOM mechanisms should work.

Third note, that the code you try to add is not valid XHTML, it is tag soup.
Using proper DOM methods reduces the risk to add nonsense to a document ;-)

Secondary menu