Click here to Skip to main content
15,917,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Kindly help me with this matter.Everything has been done.The ResponseText object contains the following text for example 1 Nestle Dairy 10;where 1 is the ProductID field, Nestle is the Product field,Dairy is the Category field and 10 is the quantity in hand field.I have to represent them in four input boxes.I want to show them like that document.getElementByID("txtProdID").value=ResponseText.Something which brings only texts and when space comes it reaches towards the other input.Thanks and regards.God bless you all
Posted

1 solution

There is a split() method defined for strings in JavaScript. You can split the response and then use the array to fill textboxes.

Look here:
MSDN: split Method (JavaScript)[^]
JavaScript split() Method[^]

Sample:
JavaScript
fullProduct = ResponseText;
var splitProduct = fullProduct.split(' ');


Try!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900