Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with iFrame and child

white.fox.ir@gmail.com
Guest
 
Posts: n/a
#1: Jul 15 '06
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>&nbsp;</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


marss
Guest
 
Posts: n/a
#2: Jul 17 '06

re: Problem with iFrame and child



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>&nbsp;</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>&nbsp;</p>" is result of pressing key "Enter"
when document in design mode. Try to use onkeyup event instead of
onkeypress. In this case "<p>&nbsp;</p>" will be inserted in the
document before you clear innerHTML property and and when you call
innerHTML="", it will be removed too.

Closed Thread