Re: Loop problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 4, 2007 1:02 pm, Dan Shirah wrote:

>  type = document.Submit.request_type.value

If you have only one "request_type" button, JavaScript can sorta
figure out which one you want here, cuz there's only one.

As soon as you have a whole bunch of them, it's got no idea which one
you want...

The easiest fix I can see would be to give each submit button a unique
name (or id, or both) so that you are looking for something more like:
var name = 'request_type_' + id;
var type = document.Submit[name].value;
or somesuch.

I dunno JS well enough to know that I've done the right thing, but go
that direction.

Maybe even go whole who and use that nifty getElementById function.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux