Note that there are some explanatory texts on larger screens.

plurals
  1. POReload Specific <div> of page during ajax call
    text
    copied!<p>I got stuck on the following issue. the issue is, I want to reload particular div of my page that also contain PHP script. My javaScript function is</p> <pre><code>function select_dayoff() { jQuery('#loader').css('display','block'); var site = "&lt;?php echo SITE_NAME.ROOT_FOLDER_NAME ?&gt;"+"fschedules/dayoff"; jQuery.ajax({ type: "POST", url: site, data: "&amp;fulldate="+MyDayoff.dayof, success: function(msg){ jQuery('#loader').css('display','none'); } }); } </code></pre> <p>and DIV is:</p> <pre><code>&lt;span id="fill_available_time"&gt; &lt;?php $form-&gt;create(MEMBER_DAYOFF,array('id'=&gt;'saveCancelDay','name'=&gt;'saveCancelDay', 'type' =&gt; 'post', 'url'=&gt;'/fschedules/dayoff')); ?&gt; &lt;div class="profile"&gt; &lt;?php if(!empty($dayoff_time)){ foreach($dayoff_time as $key =&gt; $val){ $res_dayoff_time[$val[MEMBER_DAYOFF]['dayoff']] = $val[MEMBER_DAYOFF]['dayoff']; } //echo $form-&gt;input('id_state',array('label'=&gt;'','type'=&gt;'select','id'=&gt;'state_id', 'options'=&gt;@$res_business_state, 'empty'=&gt;'Please select...' ,'class'=&gt;'required')); //echo '&lt;h2&gt;Select date for cancel dayoff&lt;/h2&gt;'; echo $form-&gt;input('dayoff_time', array('label'=&gt;'','type'=&gt;'select','id'=&gt;'dayoff_time', 'options'=&gt;$res_dayoff_time, 'empty'=&gt;'Please select...' ,'class'=&gt;'required' ,'onchange'=&gt;'','style'=&gt;'margin-left: 14px;')); echo $form-&gt;submit('Cancel Dayoff', array('type'=&gt;'submit','name'=&gt;'saveCancelDay','id'=&gt;'saveCancelDay')); }else{ echo '&lt;h2&gt;No Dayoff is registered.&lt;/h2&gt;'; } ?&gt; &lt;/div&gt; &lt;?php $form-&gt;end(null); ?&gt; &lt;/span&gt; </code></pre> <p>I want to refresh this DIV during above Ajax call. Thanks in advance for any help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload