javascript - Refreshing div after clicking on save -


i have 2 div's in layout. in left div have written form , in right div there table.

after clicking on save button, right div table present must refreshed. can me?

this code

//this **left div**, need enter **values** , when click on **save** button, values must displayed in **right div** , **right div must refreshed**   <div align="left">     <div id="bundle_number_text_label"> bundle number </div>   <input id="bundlenumber" style=" padding: 3px 0;" type="text" name="bundle_number"  /><br />     <div id="date_text_label"> date </div> <input type="text" style=" padding: 3px 0;" id="date" readonly/><br/>      <div id="length_text_label"> length </div>  <input id= "length" style=" padding: 3px 0;" type="text"  name="length" /> (in mm)     <input type="radio" name="browser" value="number" checked>  <label><?=lang('number_txt')?></label>     <input type="radio" name="browser" value="balance"/>     <label><?=lang('balance_txt')?></label></br>  <input id= "rate" style=" padding: 3px 0;" type="text"  name="rate" />   <input type="button" value="save" name="save" id="save_id">   </div> 

//this right div , after clicking on save button, values must displayed here , div has refreshed.

<div id="div_save" align="left">    <table align="center !important" width="80%"  border="1px" cellspacing="0" cellpadding="0">  <tr>   <th>select</th>&nbsp;   <th>bundle number</th>&nbsp   <th>date</th>&nbsp;   <th>length(mm)</th>&nbsp;   <th>numbers</th>   <th style="display:none;">party id</th>  </tr>     <tr>    <td align="center" valign="top">     <input type="radio" /></td>    <td align="center" valign="top"></td>      <td align="center" valign="top"></td>      <td align="center" valign="top"></td>     <td align="center" valign="top"></td>   </tr>      <tr>    <td align="center" valign="top">     <input type="radio" /></td>    <td align="center" valign="top"></td>      <td align="center" valign="top"></td>      <td align="center" valign="top"></td>     <td align="center" valign="top"></td>   </tr>  </table>  </div> 

you can in 2 or 3 fashionable ways:

you can move content of want refreshed external file , use <iframe> tag update specific frame only, or

you can use ajax refresh desired html sections, in example: http://www.w3schools.com/ajax/ajax_example.asp.

but perhaps easiest way take advantage of jquery power. in jquery can so:

$('#first_div').load('test.html', function() {   alert('loading completed.'); //callback function }); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -