S
sonic
Ok,
i am sure everyone is sick of hearing about this. but i've checked
about 10 different posts/sites about this issue, and they all say "use
DOM" but i think there is more to be said. Perhaps I am a total newbie
but the answer was not immediately obvious to me here.
so.. problem:
declaring doctype as xhtml will prevent myDiv.innerHtml=val from
working.
suggested solution:
use DOM.
var myNewDiv = document.createElement( 'div' );
myDiv.appendChild( myNewDiv );
now we have to set that new div's value somehow right? of course
myNewDiv.innerHtml will not work. so using DOM puts us in the same
exact spot. unless i went about this the wrong way.. i realize that
using dom to appen a input text will work because .value property will
be set no problem, but how do we set just a text value?
and how come
myDiv.innerHTML = val // all caps HTML
still works?
i am sure everyone is sick of hearing about this. but i've checked
about 10 different posts/sites about this issue, and they all say "use
DOM" but i think there is more to be said. Perhaps I am a total newbie
but the answer was not immediately obvious to me here.
so.. problem:
declaring doctype as xhtml will prevent myDiv.innerHtml=val from
working.
suggested solution:
use DOM.
var myNewDiv = document.createElement( 'div' );
myDiv.appendChild( myNewDiv );
now we have to set that new div's value somehow right? of course
myNewDiv.innerHtml will not work. so using DOM puts us in the same
exact spot. unless i went about this the wrong way.. i realize that
using dom to appen a input text will work because .value property will
be set no problem, but how do we set just a text value?
and how come
myDiv.innerHTML = val // all caps HTML
still works?