Results 1 to 4 of 4
Sep 2, 2008, 16:10 #1
pseudo protocol wipes out the whole document even if function doesn't return anything
I have a page in which
will cause the whole page be wiped out (blanked out) even if foo() is not returning anything. It merely loops over, say 1 to 10, getElementById, and set the checkbox's state to 0 or 1. And then the function exits without returning anything. Yet, the whole document is wiped out as blank.
Isn't it only the case when the function return something, such as doing
return "" or return false; or return "ha" that it can wipe out the whole document? thanks!
Sep 2, 2008, 20:32 #2
- Join Date
- Jan 2007
- Christchurch, New Zealand
- 104 Post(s)
- 4 Thread(s)
The function returns undefined so the pseudo protocol shows a page of content instead.
Read more about it in this post:
Sep 2, 2008, 20:44 #3
thanks for your reply Paul. I think I have seen situations in which not returning anything will cause the page to be just static: nothing changes. But if it is the case of an iframe on IE6 using the new Facebook design, then not returning anything will cause most of the page to blank out.
In fact... with the new Facebook design on IE6, if I iframe a page, and that page sets a timer (setTimeout) to wait for 3 seconds and changes an empty div's innerHTML to be "hello", then most of the page sudden blanks out... I am still looking into why.
Sep 2, 2008, 20:47 #4
by the way, I wonder if there can be any event that captures the iframe change of state? I even did inside of the iframe:
document.getElementById("for_my_content").innerHTML = document.getElementById("for_my_content").innerHTML
then most of the page will blank out.