Assign the jQuery Variable (caintains Mobile number and cantact name) to the text button. I have a list in which list items are repeated in jsp using jquery and math.random, getting a random item (containing mobile_num and name) when assigning a value to the text field, it gets only one value ... here, how the code looks like .. .
<ul><s:iterator value="CantactList"> <li> <s:property value="name"/>
<s:property value="Mobile Number"/><li></s:iterator></ul>
and in jQuery ...
$form = $("<form action="+"xyz"+"></form>");
$form.append('<input type="text" value='+item+' name="Cantact"/>');
if I use lable or alert (item) works fine .... after executing this code I check the input field. where the code is as follows.
<input type="text" 9333333="" value="Jhon" name="Cantact"/>
can't understand why this is happening ... advice ... ??
source
share