Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 1
Trades: 0
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
 
 
Register now for full access!
Old 05-09-2006, 11:13 AM Re: Auto populate field - for multiple rows
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
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 11: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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.16692 seconds with 12 queries