Log in

View Full Version : Dom node creator??



shachi
09-02-2006, 03:17 PM
Hello all,
Some time ago I came across this great tool(at least now I think so) called Dom node creator or something, at that time I thought what's the use of it but now I have to have it. Ok let me explain what it did.

If you have something like this:



<div id="test">
<div id="test2"></div>
</div>


it converted this to:



body = document.body;
div1 = document.createElement('div');
div2 = document.createElement('div');
div1.id = "test1";
div2.id = "test2";
div1.appendChild(div2);
body.appendChild(div1);


Or something similar. Has anyone(except me of course) has seen this kind of script and still have the link to it?? If you do then Please Please help me with this. Thanks a lot.

jscheuer1
09-04-2006, 05:04 AM
I'm not really clear on what you are asking for. I suppose a javascript could be written that inspects the DOM of the page and when placed in the head of a page could output a script to create that page using the DOM, and display it in a text area or pop up window. Is that what you want? If so, when I am really bored sometime, I may write it. I tried Googling for something like it but, I need to narrow and or refine my search terms.

shachi
09-04-2006, 05:08 AM
Yes, it's exactly something like that. Thanks jscheuer1.:D

I need it so that when you enter this:



<div id="test">
<div id="test2"></div>
</div>


It outputs(in a textarea):



body = document.body;
div1 = document.createElement('div');
div2 = document.createElement('div');
div1.id = "test1";
div2.id = "test2";
div1.appendChild(div2);
body.appendChild(div1);


In it's complete dom structure(even styles must be converted or just an attribute could be enough).

I couldn't find anything like that on google too(though I have seen and used something like that some time ago).

I hope you get what I am looking for.

jscheuer1
09-04-2006, 05:11 PM
Well I started playing around with this and came up with the following code:


var c=1, bd=[];
function DOM_b (node){
var bd1='', bdom=node? node.childNodes : document.body.childNodes;
for (var i_tem = 0; i_tem < bdom.length; i_tem++){
if(bdom[i_tem].tagName){
bdom[i_tem].id=bdom[i_tem].id? bdom[i_tem].id : 'new#id'+c++;
bd1+='\nvar '+bdom[i_tem].tagName.toLowerCase()+bdom[i_tem].id+'=document.createElement(\''+bdom[i_tem].tagName.toLowerCase()+'\');\n'; //'\n<'+bdom[i_tem].tagName+' '+'id="'+bdom[i_tem].id+'"' +'>\n';
for (var i = 0; i < bdom[i_tem].attributes.length; i++)
if(bdom[i_tem].attributes[i].value.length>0&&bdom[i_tem].attributes[i].value!=='null')
bd1+=bdom[i_tem].tagName.toLowerCase()+bdom[i_tem].id+'.'+bdom[i_tem].attributes[i].name+'="'+bdom[i_tem].attributes[i].value+'";\n';
if(bdom[i_tem].outerHTML&&document.body.filters){
var y=bdom[i_tem].innerHTML
var x=bdom[i_tem].outerHTML.replace(y, '').split('"');
for (var j = 0; j< x.length; j++)
if (x[j].indexOf('STYLE')>-1||x[j].indexOf('style')>-1)
bd1+='style="'+x[j+1]+'"\n';
}
}
if(bdom[i_tem].childNodes)
DOM_b(bdom[i_tem]);
}
if(node&&bd1!=='')
bd[bd.length]='// '+node.tagName+' '+'id="'+node.id+'"'+' children:\n'+bd1;
else if (bd1!==''){
bd[bd.length]= '// body children:\n'+bd1;
var report=document.createElement('textarea');
report.value=bd.join('\n');
report.rows=50;
report.cols=80;
report.setAttribute('wrap', 'off', 0);
document.body.appendChild(report);
//return bd.join('\n');
}
}
onload=function(){DOM_b();};

If there are other scripts on the page that use the onload, you could append this as the last onload event, or skip its onload call and just type this into the address bar:


javascript:void(DOM_b())

and hit enter.

Notes: This is a poor man's DOM inspector at best for the moment but, by editing the code a bit more I think I (or others) could get it pretty close to what you are asking for. It works better in the more standards compliant browsers like Opera and FF.

jscheuer1
09-07-2006, 06:32 AM
Ok, here it is, at least a beta version. Simply put this:


<script type="text/javascript" src="http://home.comcast.net/~jscheuer1/side/DOM_b.js">
/*DOM_b - HTML page body generation script
*creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use */
</script>

as the last thing on your page, just above the </body> tag. It will write out the page's on page style sheets (if any) followed by a script to write out the page's body using the DOM. This will appear in a textarea at the bottom of the page's normally positioned content (absolutely and relatively positioned content may overlap).

Select all and paste it into the head of an otherwise blank page:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
<body>

</body>
</html>

and it will recreate the source page via the DOM.

Best in Firefox. Works pretty well in Opera and IE too. Untested in others. May have some bugs to work out. If you have other scripts in the body of a page you try this with, the results will be mixed as far as those scripts go, especially poor in IE. Best to find another way of dealing with scripts in the body (if any). It does work very well in the above three browsers with a variety of HTML markups I tested it with.

shachi
09-07-2006, 03:18 PM
Oh Thanks jscheuer1, I think that you must submit this script to the DD once you are done. :) And thanks again for the script I must test it now. And it would be better if you could tell me how to use it(I mean how to place it in my html because when I tried it it doesn't show anything except a blank page.:( HTML included below)



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="http://home.comcast.net/~jscheuer1/side/DOM_b.js">
/*DOM_b - HTML page body generation script
*creation Wizard &#169; John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use */
</script>
</head>
<body>
</body>
</html>

jscheuer1
09-07-2006, 04:47 PM
It shows nothing because there is nothing to show. You should use the script at the bottom of a page that you want to generate a DOM script for, one with some content on it. Once you run it on a page like that, it will generate the DOM script for that page. Then you take this newly generated script and past that into your blank page's head to recreate the source page via the DOM.

Try this very simple example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>Hi</p>
<script type="text/javascript" src="http://home.comcast.net/~jscheuer1/side/DOM_b.js">
/*DOM_b - HTML page body generation script
*creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use */
</script>
</body>
</html>

It should generate a script like so, or equivalent (depending upon the browser):


<script type="text/javascript">

/*This DOM - HTML page body generation script was created using
*DOM_b - Page Body Generator Script Creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use. */

/*Run on Browser reported as: Operaź,
*userAgent: Opera/9.01 (Windows NT 5.1; U; en),
*vendor: NA
*Edited (yes/no)? No - If yes, by:?
*This notice must remain for legal use. */

function domit(){

// p ident="_node_1" children:
var text0=document.createTextNode("Hi");

// body children:

var p_node_1=document.createElement('p');

//appending elements:

p_node_1.appendChild(text0);
document.body.appendChild(p_node_1);
}
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", domit, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", domit );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
domit();
};
}
else
window.onload = domit;
}
</script>

It is this new script that gets pasted to the head of a blank page.

shachi
09-07-2006, 05:28 PM
jscheuer1: Can't you make it so that it only translates the user inputted data instead of creating the dom node for the whole page??

jscheuer1
09-07-2006, 05:46 PM
I suppose but, I like it better this way because you have to view the content in the browser - as you've written it - in order to generate the DOM script for it. This very act will help weed out errors that could easily creep in otherwise.

Also, as it stands now, if you write invalid code, if there is a chance that the browser can parse it, you may still get a valid DOM script generated.

In any case, what you are talking about would be a completely different script as, it wouldn't be parsing the DOM, just some text input. For this reason, I would think that it would either have to be very basic and ignore many possible attributes and styles for the nodes, or be incredibly complex to allow for any possibility. I'm not certain of this last bit though, so will kick the idea around a bit more.

mwinter
09-07-2006, 06:26 PM
... I think that you must submit this script to the DD once you are done.

On principle, I would say that's not a good idea. The DOM shouldn't be used to insert large amounts of content into a document. Rather, it should be used to manipulate the structure of existing content. If you still want to do it anyway, use the innerHTML property and be done with it. It might even be more efficient and compatible.

Mike


Nothing against what you've written, John. This is about usage, not quality.

shachi
09-07-2006, 06:30 PM
On principle, I would say that's not a good idea. The DOM shouldn't be used to insert large amounts of content into a document. Rather, it should be used to manipulate the structure of existing content. If you still want to do it anyway, use the innerHTML property and be done with it. It might even be more efficient.

Mike


Nothing against what you've written, John. This is about usage, not quality.


mwinter: I am not trying to make a whole site with dom nodes I just wanted to create a simple content box thingy(dynamically) but I couldn't do that with innerHTML because I must use dom nodes what so ever for what I am trying.

mwinter
09-07-2006, 06:49 PM
I am not trying to make a whole site with dom nodes ...

I never said you were, nor was my post aimed at you. My point was that DOM methods and objects should either be used in such a way that mapping markup to method calls isn't appropriate (manipulating existing content), or creating content in a way that is so trivial that using a tool isn't necessary. Going beyond that invites abuse and dependancy: using scripting to create content instead of real markup.

Mike

blm126
09-07-2006, 11:46 PM
My point was that DOM methods and objects should either be used in such a way that mapping markup to method calls isn't appropriate (manipulating existing content), or creating content in a way that is so trivial that using a tool isn't necessary. Going beyond that invites abuse and dependancy: using scripting to create content instead of real markup.

Mike
Yes, but what about all the legitimate uses of such a script? For example, say you wrote a find-in-page search script. It is dependent on javascript. The only way you can be sure the page is not shown when javascript is disabled is to produce the whole thing with javascript.

shachi
09-08-2006, 05:16 AM
mwinter: I apologize for my misunderstanding.

I don't care whether other users do have javascript or not because I am using this to make an app for myself and not going to release to the public so generating content with javascript is not a problem for me as I already have javascript in my browser.

I apologize again for my misunderstanding and if I have said something wrong in this post.

jscheuer1
09-08-2006, 05:58 AM
Well now, quite a hornet's nest I've stirred up. I've decided to bow to pressure from both sides in this debate and have adapted my generator somewhat to more suitable objectives (as per Mike's idea that this should only be done with an element or two) and to an input/output style application (as per shachi's request). Copy and paste and Enjoy! (or grumble):


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<script type="text/javascript" src="http://home.comcast.net/~jscheuer1/side/DOM_b_input.js">
/*DOM_b_input - HTML elements generation script
*creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use */
</script>
</body>
</html>

Notes: There still may be a place for this baby in the annals of the Dynamic Drive Script's Library - Mike's objections with some standing. I can't argue that it invites abuse - though not quite so much as the original version. But just about everything that makes life easier or more enjoyable does that.

IE behavior has been cleaned up a bit. There may still be bugs (with any particular or all browsers). Let me know if you think you've found one. Tested on IE 6, Opera 9.01 and FF 1.5.0.6

mwinter
09-08-2006, 07:07 PM
Yes, but what about all the legitimate uses of such a script? For example, say you wrote a find-in-page search script.

It would qualify under trivial: it would only require a few new elements and possibly a text node.



It is dependent on javascript.

And it is also an expendable, extra feature, not content. No-one would care if it didn't appear (especially because many browsers include such a feature, anyway).



The only way you can be sure the page is not shown when javascript is disabled ...

The page? I assume (and hope) you meant to refer to the search's input controls.




I apologize for my misunderstanding.

Relax, you have no reason to apologise. :)

Mike

blm126
09-08-2006, 08:06 PM
The page? I assume (and hope) you meant to refer to the search's input controls.

Yup, meant the control.

A little styling, a preview box, and this could be a nice little tool.

shachi
09-09-2006, 06:32 AM
Thanks jscheuer1, mwinter and blm126. I am really happy that you managed to make this jscheuer1, *but* I would be more happy if you could share how you made it(tried looking at the source but unfortunately couldn't understand almost anything).

jscheuer1
09-09-2006, 09:46 AM
Here is an annotated version of the code (part one of two):



/*DOM_b_input - HTML elements generation script
*creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use
*Annotations also © John Davenport Scheuer */

//Set document title
document.title="DOM_b_input - HTML elements generation script creation Wizard \xa9 John Davenport Scheuer"

//Write out the page
document.write('<h2>DOM_b_input - HTML elements generation script creation Wizard</h2>\n'+
'<pre style="color:green;background-color:white;display:inline;">\n'+
' \n'+
' /*DOM_b_input - HTML elements generation script \n'+
' *creation Wizard \xa9 John Davenport Scheuer \n'+
' *Visit http://www.dynamicdrive.com/forums \n'+
' *user name:jscheuer1 - This notice must remain for legal use */ \n'+
' \n'+
'</pre><br>\n'+
'<div>Input HTML Elements:</div>\n'+
'<textarea id="db" rows="5" cols="50">\n'+
'<p>"Example"</p>\n'+
'</textarea><br>\n'+
'<input type="button" value="domit" onclick="DOM_c();"><input type="button" value="reset" onclick="DOM_c(\'clear\');">\n'+
'<div id="dbdiv" style="display:none;"></div>\n')

function DOM_c(clear){ //function to clear form, reset global variables, and remove generated script, if any
t=0, c=1, bd=[], ap=[], bap=[];
if (document.getElementById('report')&&document.getElementById('report').parentNode)
document.getElementById('report').parentNode.removeChild(document.getElementById('report'));
if(clear)
document.getElementById('db').value='';
else{
document.getElementById('dbdiv').innerHTML=document.getElementById('db').value;
DOM_b()
}
}

function encamel(txt){ //function to convert hyphenated style properties to camel style notation
var txt=txt.toLowerCase(), ntxt='';
for (var i_tem = 0; i_tem < txt.length; i_tem++)
if (txt.charAt(i_tem)=='-'){
i_tem++;
ntxt+=txt.charAt(i_tem).toUpperCase();
}
else
ntxt+=txt.charAt(i_tem);
return ntxt;
}

//set variables - t to count text nodes, c to count and label tag nodes, array bd - each entry is a node's children
//array ab - each entry is an appendChild command for a node child, array bap - each entry is an appendChild for the body
var t=0, c=1, bd=[], ap=[], bap=[];

function DOM_b (node){ //The main function called for each element/node

//set variables - bd1 to hold a child nodes commands for construction, array nap to hold appendChild commands until they can
//be added to ap in the proper order, object bdom holds the element's children for analysis
var bd1='', nap=[], bdom=node? node.childNodes : document.getElementById('dbdiv').childNodes;
nap.length=0; //reset nap to 0 for each run
for (var i_tem = 0; i_tem < bdom.length; i_tem++){ //iterate over current node's children
//determine if this is a tag and if so, capture its tagName, if not capture 0 so we will know it isn't a tag later
var tag=bdom[i_tem].tagName? bdom[i_tem].tagName.toLowerCase() : 0 ;
//focus on tags only and reject unsuitable tags
if(tag&&tag!=='!'&&tag!=='style'&&(tag!=='script'||!bdom[i_tem].src||(bdom[i_tem].src&&bdom[i_tem].src.indexOf('DOM_b')<0))){
bdom[i_tem].ident='_node_'+c++; //set a unique identifier for this node
var theId=tag+bdom[i_tem].ident; //assign a variable name for the node using its unique id and tag name
if (node) //if this isn't the first run through (a child node) store an appendChild command for this child's child
//in the nap array
nap[nap.length]=node.tagName.toLowerCase()+node.ident+'.appendChild('+theId+');\n';
else //this is the first run through so the append command will be to the body and be stored in the bap array
bap[bap.length]='document.body.appendChild('+theId+');\n';
bd1+='\nvar '+theId+'=document.createElement(\''+tag+'\');\n'; //start loading up a text string with commands for this child
if (bdom[i_tem].attributes) //if this child has attributes
for (var i = 0; i < bdom[i_tem].attributes.length; i++){ //iterate over them
//grabbing the name and value of the attribute
var theName=bdom[i_tem].attributes[i].name.toLowerCase(), theValue=bdom[i_tem].attributes[i].value;
if(theValue.length>0&&theValue!=='null') //if the attribute has any real value perform further checks
if(bdom[i_tem].attributes[i].name.toLowerCase()=='style'){ //if the attribute is style,
var sar=theValue.split(';'); //parse out the property/value pairs to an array
for (var q = 0; q < sar.length; q++){ //iterate over this array,
var sarq=sar[q].split(':'); //parsing into another array individual property/value pairs
if (sarq[0].length>1) //if a given property isn't just a space or a single character or empty,
//write out a command to assign it and its value to the child and add that to the child's declaration string
bd1+=theId+'.style.'+encamel(sarq[0]).replace(/ /g, '')+'="'+sarq[1].replace(/ /g, '')+'";\n';
}
}
else if (theName.indexOf('on')==0) //if the attribute is an event, parse out its commands into
//a function and add assignment of this function to the event for the child's declaration string
bd1+=theId+'.'+theName+'=function(){\n'+theValue.replace(/;/g, ';\n')+'};\n';
else if (theName=='class') //if the attribute is class, format and add a declaration command
bd1+=theId+'.className="'+theValue+'";\n';

jscheuer1
09-09-2006, 09:48 AM
part two:


//weed out from the remaining attributes those which are common in IE without being written to the tag and our assigned ident attribute
else if (theName!=='ident'&&(!/nowrap|disabled|hidefocus/.test(theName)||theValue!=='false')&&(!/contenteditable/.test(theName)||theValue!=='inherit')&&(!/tabindex/.test(theName)||theValue!=='0'))
//add the remaining attributes to the child's declaration string, if any remain
bd1+=theId+'.setAttribute("'+theName+'", "'+theValue+'", 0);\n';
}
if(bdom[i_tem].outerHTML&&document.body.filters){ //if IE, the style will not be reported as an attribute but,
//can be grabbed from the outerHTML minus the innerHTML and parsed in a similar fashion to other browsers
var z='', f='';
if(bdom[i_tem].filters.length>0){ //with special attention to filter styles, if any
f=/filter: ;/i;
z=bdom[i_tem].style.filter;
bd1+='if(document.body.filters)\n'; //add a conditional and the command for any filters
bd1+=theId+'.style.filter="'+z+'";\n'; //to our declaration string
}
var y=bdom[i_tem].innerHTML
var x=bdom[i_tem].outerHTML.replace(y, '').replace(z, '').replace(f, '').split('"'); //weed out filters, if any and
for (var j = 0; j< x.length; j++) //parse out the remaining styles
if (x[j].indexOf('STYLE')>-1||x[j].indexOf('style')>-1){ //if any
var sar=x[j+1].split(';');
for (var q = 0; q < sar.length; q++){
var sarq=sar[q].split(':');
if (sarq[0].length>1)
bd1+=theId+'.style.'+encamel(sarq[0]).replace(/ /g, '')+'="'+sarq[1].replace(/ /g, '')+'";\n';
}
}
} //end IE style parsing
}
else if (bdom[i_tem].nodeValue&&bdom[i_tem].nodeName.toLowerCase()=='#text'){ //if this is not a tag, is it a text node?
var nn=node? node.tagName.toLowerCase() : 0, bv=bdom[i_tem].nodeValue; //if text, grab the parent if it isn't the body, also grab the value
//weed out unsuitable parents
if ((nn&&nn!=='style'&&(nn!=='script'||!node.src||node.src.indexOf('DOM_b')<0))&&(bv.replace(/[ \b\t\r\v\f\n\e]*/mg, '').length>0)){
var iens='' //set a varaible to hold conditional for IE, if needed later
if (nn&&nn=='script')
iens='if (!document.body.filters)\n'; //IE can't handle assigning a text node to a script tag
//handle pre tags and text with pre styling without stripping extra space or line breaks
if (nn&&nn=='pre'||(node.style&&node.style.whiteSpace&&node.style.whiteSpace.toLowerCase=='pre'))
//add pre text node creation command with proper formatting
bd1+=iens+'var text'+[t++]+'=document.createTextNode(\''+bv.replace(/'/mg, '\\\'').replace(/\n|\r/mg, '\\n')+'\');\n';
else //all other text may be stripped of extra white space before adding to the declaration string
bd1+=iens+'var text'+[t++]+'=document.createTextNode(\''+bv.replace(/'/mg, '\\\'').replace(/\n|\r/mg, ' ').replace(/\s+/g, ' ')+'\');\n';
//add the text node to its parent's appendChild array item
nap[nap.length]=iens+(nn? nn+node.ident : 'document.body')+'.appendChild(text'+[t-1]+');\n';
}
}
if(bdom[i_tem].childNodes) //if this child has one or more children run it through main function
DOM_b(bdom[i_tem]);
}
if(node&&bd1!==''){ //if this node has any child declarations and isn't the body
ap=ap.reverse(); //reverse the existing main appendChild declarations, if any to
for (var a = 0; a< nap.length; a++) //iterate through this node's appendChild declarations
ap[ap.length]=nap[a]; //and add them to the main ones in the right spot
ap=ap.reverse(); // restoring the order now that they are added
//Store the accumulated string of child creations with their attributes, if any for this node in the
//array reserved for that purpose along with the label of this parent node
bd[bd.length]='// '+node.tagName.toLowerCase()+' '+'ident="'+node.ident+'"'+' children:\n'+bd1;
}
else if (bd1!==''){ //if it is the body, append directly to the array
bd[bd.length]= '// body children:\n'+bd1;
//when we get here, we are all done except for writing out the script from all the stored
//commands and declarations and appending the script in a textarea to the page for viewing
//by joining and concatenating our various arrays and adding the comments and the onload code
var rep=bd.join('\n')+'\n//appending elements:\n\n'+ap.reverse().join('')+bap.join('');
var report=document.createElement('textarea');
report.value='<script type="text/javascript">\n\n'+
'/*This DOM - HTML elements generation script was created using\n'+
' *DOM_b_input - HTML Elements Generator Script Creation Wizard\n'+
' * \xa9 John Davenport Scheuer - Visit http://www.dynamicdrive.com/forums\n'+
' *user name:jscheuer1 - This notice must remain for legal use. */\n\n'+
'/*Run on Browser reported as: '+navigator.appName+' \xae,\n'+
' *userAgent: '+navigator.userAgent+',\n'+
' *vendor: '+(navigator.vendor? navigator.vendor : 'NA')+'\n'+
' *Edited (yes/no)? No - If yes, by:?\n'+
' *This notice must remain for legal use. */\n\n'+
'function domit(){\n\n'+
rep+
'}\n'+
'if ( typeof window.addEventListener != "undefined" )\n'+
' window.addEventListener( "load", domit, false );\n'+
'else if ( typeof window.attachEvent != "undefined" )\n'+
' window.attachEvent( "onload", domit );\n'+
'else {\n'+
' if ( window.onload != null ) {\n'+
' var oldOnload = window.onload;\n'+
' window.onload = function ( e ) {\n'+
' oldOnload( e );\n'+
' domit();\n'+
' };\n'+
' }\n'+
' else\n'+
' window.onload = domit;\n'+
'}\n'+
'<\/script>';
report.id='report';
report.rows=30;
report.cols=80;
report.setAttribute('wrap', 'off', 0);
report.style.display='block';
document.body.appendChild(report);
}
}

//<script type="text/javascript" src="http://home.comcast.net/~jscheuer1/side/DOM_b_input.js">
/*DOM_b_input - HTML elements generation script
*creation Wizard © John Davenport Scheuer
*Visit http://www.dynamicdrive.com/forums
*user name:jscheuer1 - This notice must remain for legal use */
//</script>