logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • lars
    • Posted on Wed 25 Feb 2004

    <SCRIPT LANGUAGE="JavaScript" defer>

    //loop through all the forms on the document (usually just the one); for ( var i = 0; i < ExtDoc.forms.length; i++ ){ OUTPUT += '<tr><td><span class="Header">Form #' + (i+1) + ' = ' + ExtDoc.forms[i].name + '</span></td></tr>'; OUTPUT += '<tr><td>'; OUTPUT += '<table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#bbbbbb" width="100%"><tr class="Header"><td>Field Name</td><td>Field Value</td></tr>';

    //loop through all the elements on the form for ( var j = 0; j < ExtDoc.forms[i].elements.length; j++ ){ //create a row in the table if the element is a hidden input field if (ExtDoc.forms[i].elements[j].type == "hidden") OUTPUT += '<tr><td>' + ExtDoc.forms[i].elements[j].name + '</td><td>' + ExtDoc.forms[i].elements[j].value + '\n</td></tr>'; }

    OUTPUT += '</table>' OUTPUT += '</td></tr>'; }

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: