white.fox.ir@gmail.com написав:
Quote:
hello freinds....
i have and Iframe and i attach an event to that ...for Enter Key Press
when EnterKey is Press all iframe.document.body.innerHTML send to a
function and set innerHTML = "" .
but my problem is when i pree enter and set innerHTML="" iframe
atomaticly append <p> </pto iframe.
how cna i remove that???
>
ican't use iframe.document.write or open or location..beacuse it clear
all my context even JavaScript and i don't it happen
>
sorry for my poor english...and thanks for your help
It is hard to reconstruct your problem from your description.
I guess addition of "<p> </p>" is result of pressing key "Enter"
when document in design mode. Try to use onkeyup event instead of
onkeypress. In this case "<p> </p>" will be inserted in the
document before you clear innerHTML property and and when you call
innerHTML="", it will be removed too.