I need to be able to replace all document content with the response received from an ajax request.
I tried to assign document.body.innerHTML, and also tried to use document.write(). Although both are functional on the Safari desktop, I need a solution for the iPhone / iPod Touch. Trying to change document.body.innerHTMLthrows exception 7 and the function document.write()is undefined on mobile safari.
Basically, I show an activity indicator, waiting for the completion of the form. I donโt want the safari to start drawing the response until it has filled out the whole answer, as this may take some time.
source
share