1

In a html page when data comes through an ajax call its in this format.

<input type="hidden" id="s1" name="1" value="111" />
<input type="hidden" id="s2" name="2" value="222" />

and its loads in <div="ajax"> Ajax data </div>

but i have to show data in another div like this using jquery or javascript:

<div id="j1"> 111 </div>
<div id="j2"> 222 </div>

So i need a jquery or javascript code to handle the situation.

1 Answers1

1

In Callback write this:

$('#j1').html($('#s1').val());
$('#j2').html($('#s2').val());
Coderaemon
  • 3,619
  • 6
  • 27
  • 50
  • can you show response from your server side function? Just put those values in the new div using .html() method of jQuery – Coderaemon May 01 '14 at 09:08