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

where is the html from a document.write()?

P: n/a
Sorry, more dumb newb questions.

I've got part of a page that seems to be rendering just fine. It's built by:
function writeTabPanel(){

var tpText = '';
tpText += '<div id="';
tpText += this.tab.id;
[...]
tpText += '">';
tpText += '</iframe>';
document.write(tpText);
}

and i'd like to be able to see the source so i can tell where i lost the
value of a couple variable. but all i can find is the place where this
is called:
var tabPanel2 = new tabPanel(tab2,panel2,document.forms[0],0);
tabPanel2.writeTabPanel();
//show first panel
showPanel("tab1","panel1",this.form);
Oct 7 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Matthew Crouch wrote on 07 okt 2005 in comp.lang.javascript:
I've got part of a page that seems to be rendering just fine. It's
built by:
function writeTabPanel(){

var tpText = '';
tpText += '<div id="';
tpText += this.tab.id;
[...]
tpText += '">';
tpText += '</iframe>';
document.write(tpText);
}


You cannot use document.write() after the page displays without overwriting
the whole page, including the script.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 7 '05 #2

P: n/a
Matthew Crouch said the following on 10/7/2005 3:36 PM:
Sorry, more dumb newb questions.

I've got part of a page that seems to be rendering just fine. It's built
by:
function writeTabPanel(){

var tpText = '';
tpText += '<div id="';
tpText += this.tab.id;
[...]
tpText += '">';
tpText += '</iframe>';
document.write(tpText);
}

and i'd like to be able to see the source so i can tell where i lost the
value of a couple variable. but all i can find is the place where this
is called:
var tabPanel2 = new tabPanel(tab2,panel2,document.forms[0],0);
tabPanel2.writeTabPanel();
//show first panel
showPanel("tab1","panel1",this.form);


Post a URL to the full code. Snippets of code, in this case, are of no use.

Try this in the URL bar of IE, it will give you the page source, all
prettied up for you:

javascript:'<code><ol><li>'+(document.documentElem ent||document.body).outerHTML.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/%20%20/g,"&nbsp;%20").replace(/(\n\r?|\r)/g,"<li>")+'<\/ol><\/code>';

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 7 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.