By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,607 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,607 IT Pros & Developers. It's quick & easy.

document.write() problem

P: n/a
Hi, please can somebody help me with this? I have a HTML document
displayed in an iframe. Controls on the HTML page are data bound to an
XML file. I use a drop-down list to move between the different
recordsets in the XML file and hence change the text displayed in the
HTML page.

I use JavaScript to display the contents of the iframe in a separate
window. The new window displays the HTML page. The problem is that
contents of the HTML page are always for the first recordset in the XML
file even when I change to a different recordset.

I found that if I omit the document.write from the code then it works
OK. Am I doing something wrong?

Here's the JS code:

function displayFullScreen() {

newWindow = window.open("", "newWin",
"toolbar=yes,location=no,scrollbars=no,resizeable= yes,width=screen.width,height=screen.height,left=0 ,top=0")

newWindow.document.write((getRframedoc()).document Element.outerHTML)
newWindow.document.close()
}

thanks again.

sean

Aug 25 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


seans wrote:
Hi, please can somebody help me with this? I have a HTML document
displayed in an iframe. Controls on the HTML page are data bound to an
XML file. I use a drop-down list to move between the different
recordsets in the XML file and hence change the text displayed in the
HTML page.

I use JavaScript to display the contents of the iframe in a separate
window. The new window displays the HTML page. The problem is that
contents of the HTML page are always for the first recordset in the XML
file even when I change to a different recordset.
newWindow = window.open("", "newWin",
"toolbar=yes,location=no,scrollbars=no,resizeable= yes,width=screen.width,height=screen.height,left=0 ,top=0")

newWindow.document.write((getRframedoc()).document Element.outerHTML)
newWindow.document.close()


There does not seem to be anything wrong with the code as it is, perhaps
with data bound controls any content change is to reflected in
inner/outerHTML.
Can you post a URL where you try the above?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 25 '05 #2

P: n/a
Hi Martin. Thanks for your reply. I managed to overcome the problem.

thanks,

sean

Sep 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.