-->

How to refresh a particular div in a page that con

2019-07-18 04:48发布

问题:

I work with OpenEprp 7.0 and i want to refresh a particular div in a page that contains a dashboard. the code of the first part of the dashboard is the following:

<t t-if="number === 2">
        <table  style="margin-left:360px;margin-top:0px;margin-bottom:0px;">
            <tr>
                <td style="text-align:left;font-size:12px;"><b>Jusqu'au mois courant:</b></td>
                <td>
                   <input type="radio" id="radio_budget_cumulee_jusque_mois_courant" value="courant" name="radio_budget_cumulee" />

                </td> 
            </tr> 
             <tr>      
                 <td style="text-align:left;font-size:12px;"><b>Jusqu'au fin d'année:</b></td>
                <td>   
                   <input type="radio" id="radio_budget_cumulee_jusque_fin_anneee" value="fin" name="radio_budget_cumulee"/>
                </td> 
            </tr>
        </table>
       <div id="budg"> 
        <div  t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe_content" t-att-style="action.attrs.fold ? 'display: none;' : 'height: 220px;overflow-x: hidden;overflow-y: auto;padding: 0 12px 1px;'"></div>
        </div> 
    </t>

I want to refresh the div with the id budg in my js i write the following code:

$('#budg').load(document.URL +  ' #budg');

the div is loaded but there is no content. Any help please