468,306 Members | 1,132 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

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

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
2 1169
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
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.

Similar topics

9 posts views Thread by ALuPin | last post: by
9 posts views Thread by Arash Dejkam | last post: by
1 post views Thread by cirillo_curiosone | last post: by
9 posts views Thread by ME | last post: by
3 posts views Thread by daveyand | last post: by
2 posts views Thread by Kajsa Anka | last post: by
2 posts views Thread by Reggie | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.