Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java script

Status
Not open for further replies.

ksk2606

Programmer
Aug 10, 2010
1
IN
I have a java script function and getting "pitems" list values in select, and i want to send the values in the form of List to my CommonService class through f_getPop().
How can i send "pitems" List to my CommonService class
Below code is not working...

function f_getPop(){
CommonService.getAmount(document.getElementById("pitems").value , populateAmount);
}
function populateAmount(data){
document.getElementById("amount").value=data;
}

<td><s:select label="Items" headerKey="1" headerValue="--Please Select--" list="items" name="purchaseitems" id="pitems" listKey="desc" listValue="desc" multiple="true" onchange="f_getPop()"></s:select></td>

<td><s:textfield label="Amount" name="amount" id="amount"/></td>

Can u plz help me out???
 
Is CommonService a server-side Java or .Net control / object? If so, you are best asking in the forum for that to find out the most appropriate method, although it will probably involve some sort of form post or AJAX call.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top