battasrinivasa
09-20-2005, 01:48 PM
Hi everybody,
I am working with a javascript function for my javascript toolbar. With this function i am trying to find out all the javascript present in the page and preparing a string and trying to write that string in a new window.
But when i am trying to do this with my function it is not writing all the javascript found in that page. some part is not written in the new window.
do i need to use any flush or anything for this purpose.....?
You please have a look of my javascript function below:
--------------------------------------------------------
function viewJavascript()
{
var tagArray = window.document.getElementsByTagName('*');
var s ='';
var js='';
for(var i=0;i<tagArray.length;i++)
{
s = (tagArray[i].tagName).toLowerCase();
if((s=='script')&&((tagArray[i].language).toLowerCase()=='javascript'))
{
js='<br>'+js+tagArray[i].innerHTML;
}
}
var n = window.open('javascript');
n.document.write(js);
}
--------------------------------------------------------
thanks in advance
batta
I am working with a javascript function for my javascript toolbar. With this function i am trying to find out all the javascript present in the page and preparing a string and trying to write that string in a new window.
But when i am trying to do this with my function it is not writing all the javascript found in that page. some part is not written in the new window.
do i need to use any flush or anything for this purpose.....?
You please have a look of my javascript function below:
--------------------------------------------------------
function viewJavascript()
{
var tagArray = window.document.getElementsByTagName('*');
var s ='';
var js='';
for(var i=0;i<tagArray.length;i++)
{
s = (tagArray[i].tagName).toLowerCase();
if((s=='script')&&((tagArray[i].language).toLowerCase()=='javascript'))
{
js='<br>'+js+tagArray[i].innerHTML;
}
}
var n = window.open('javascript');
n.document.write(js);
}
--------------------------------------------------------
thanks in advance
batta