hello all, (congratulation s for the new name admins)
i have this anoyying issue that i cant resolve.. :(
i am trying to open a small window (popup) with javascript.
all i want in that window is an output of a javascript i have.
here is the function:
[CODE=javascript]function previewHtmlT(){
text = "for now i am putting text string but the real thing is <script type javascript></scrip> witch is working cuz i can alert it or document.write it to the new window"
w=window.open(' ','nevermind',' width=400,heigh t=400,scrollbar s=no,toolbar=no ,directories=no ,status=no,resi zable=yes');
w.document.open ();
Body = w.document.getE lementsByTagNam e('body')[0];
Body.innerHTML= text;
w.document.clos e();
}[/CODE]
why its not working??
i am getting error saying : 'Body has no properties'
what am i missing?
i have this anoyying issue that i cant resolve.. :(
i am trying to open a small window (popup) with javascript.
all i want in that window is an output of a javascript i have.
here is the function:
[CODE=javascript]function previewHtmlT(){
text = "for now i am putting text string but the real thing is <script type javascript></scrip> witch is working cuz i can alert it or document.write it to the new window"
w=window.open(' ','nevermind',' width=400,heigh t=400,scrollbar s=no,toolbar=no ,directories=no ,status=no,resi zable=yes');
w.document.open ();
Body = w.document.getE lementsByTagNam e('body')[0];
Body.innerHTML= text;
w.document.clos e();
}[/CODE]
why its not working??
i am getting error saying : 'Body has no properties'
what am i missing?
Comment