Reply
Auto populate field - for multiple rows
Old 05-08-2006, 05:21 PM Auto populate field - for multiple rows
Junior Talker

Posts: 1
My issue is how do I 'loop' so that the auto populate field works for he next row under description/price. I have it working for the first item row but cannot get it to work for the remaining rows. This is the link to the form I am referring. I need the price field to populate once making the description selection.

https://www.michaeldemoranvillephoto...r_form2add.asp
suskie is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-09-2006, 10:13 AM Re: Auto populate field - for multiple rows
funkdaddu's Avatar
Web Design Snob

Posts: 636
FYI, Your HTML table is messed up, there is some bad code in there somewhere.

For the script all you need is one function:
Code:
function changeText(priceBox,target) {
	document.orderform.elements[target].value=textBlocks[priceBox.selectedIndex];
}
and then target your boxes like this:
Code:
<SELECT name="Item1Price" onChange="changeText(this,'Item1Description');">
and use Item2Description, Item3Description, etc in the changeText's sent paramaters... you should also add your total function to the onChange of the dropdowns, so if someone adds a quantity, then changes their mind of what size they want, it calculates it.

Last edited by funkdaddu : 05-09-2006 at 10:15 AM.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Auto populate field - for multiple rows
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13047 seconds with 12 queries