[thelist] form field listing

Erik Mattheis gozz at gozz.com
Fri Jan 17 16:20:01 CST 2003


Yes, JavaScript to the rescue. Try something like:

function doMyWorkForMe() {
	var the_stuff = '';
	for (i = 0; i < document.forms[0].elements.length; i++) {
		the_stuff += 'type: ' + document.forms[0].elements[i].type + '<br />';
		the_stuff += 'size: ' + document.forms[0].elements[i].size + '<br />';
		the_stuff += 'maxlength: ' + document.forms[0].elements[i].maxlength
+ '<br />';
		// etc etc etc
		the_stuff += '<br />'
	}
document.write(the_stuff);
}

window.onload = doMyWorkForMe;


On Friday, January 17, 2003, at 03:58 PM, Kyle Murphy wrote:

> Anyone know of a tool that will read your HTML file & list all of the
> form fields along with their attributes (name, maxlength, value, etc.)?
>
> I've got a LONG form with about 150 fields that I need to create a
> database for & I don't want to search through my code to find the form
> fields individually.
>
> I know I could loop through the form fieldnames in CF, but it only
> gives
> me the name & value for each.  I need more information.

-  -  -  -  -  -  -  -  -  -  -
Erik Mattheis
(612) 377 2272
<http://goZz.com/>
-  -  -  -  -  -  -  -  -  -  -




More information about the thelist mailing list