Passing HTML array index to JS?

From: Date: Mon, 07 Dec 2009 23:02:39 +0000
Subject: Passing HTML array index to JS?
Groups: php.general 
Request: Send a blank email to php-general+get-300298@lists.php.net to get a copy of this message
Hey all, I have an HTML field like this <input type="text" name="qty[]" value="!!quantity!!" size="4" style="text-align: right;" onblur="calculateBidUnit();"> ... and what I need to do is pass to the calculateBidUnit function the value of quantity, do a calculation on it and plug into this field. <input type="text" name="bid_unit_value[]" value="" size="4"> Which of course I know how to do for non-array values, but not sure how to get the values to do the calculation on the JS side if the fields are in an array. Any help, as always, is greatly appreciated, Skip -- ==================================== Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com ------------------------------------ Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut

« previous php.general (#300298) next »