[thelist] Re: Radio buttons: dynamically loading form data

Timothy Martens timfm at hawaii.rr.com
Tue Apr 9 18:00:01 CDT 2002


Anthony  wrote:

"When I've rebuilt Select Boxes, I've always first deleted them in
reverse
order.

with (document.Form.SelectList) {
    for (var i = options.length - 1; i > 0; i--) {
       options[i]=null;
    }
    for (var i = 0; i <= varNewArray.length - 1; i++) {
       options[i] = varNewArray[i];
    }
    options[0].selected=true;
}"

Anthony -- More More! Does this imply that you're using a array for all
the option values rather than 3 different functions? Something like (I'm
getting way in over my head here):

	temp = document.foo.but;
	groups = document.foo.bar.options.length;
	group = new Array(groups);
	for (i = 0; i<groups; i++) {
		group[i] = new Array();
		}
	group[1][0] = new Option('txt','val')
	group[1][1] = new Option(txt',val')

	group[2][0] = new Option('txt','val')
	group[2][1] = new Option(txt','val')

	group[3][0] = new Option('txt','val')
	group[3][1] = new Option('txt','val')



Stéphane D wrote,

"Or maybe you don't need something that works with NN4?"

Actually that's the case this time. The tool I'm trying to build will be
for use by web developers in DOM compliant browsers only.   :)



Andrew M wrote,

"why are you using js?"

Are you suggesting something server-side? Cause my goal here is to have
everything work on the client-side and I don't know enough about RPC to
do it that way.

//t


::::::::::::::::::::::::
<!--Timothy Martens
timfm at hawaii.rr.com-->




More information about the thelist mailing list