Skip to main content
Topic: javascript object refresh (Read 1533 times) previous topic - next topic

javascript object refresh

I have a hierarchical tree generated with javascrip. It takes data from a .js file. When the data is changed in that file, the tree view is not refreshed in the page.
Executing the html demo file out of the phprad project, the refresh is immediately. Is there a setting in phprad?


 

Re: javascript object refresh

Reply #2
tree.js build the tree; tree_items.js has the data to build the tree (the nodes). When the data changes in tree_items.js, the tree view is not refreshed. It is necesary to clear files and images stored in the browser's cache in order to refresh the tree view . This is the code:


<script language="JavaScript" src="http://localhost/test-tree/assets/js/tree.js"></script>
<script language="JavaScript" src="http://localhost/test-tree/assets/js/tree_items.js"></script>
<script language="JavaScript" src="http://localhost/test-tree/assets/js/tree_tpl.js"></script>

<table cellpadding="5" cellspacing="0" cellpadding="10" border="0" width="100%">
<tr>
   <td>
   <script language="JavaScript">
   <!--//
      new tree (TREE_ITEMS, TREE_TPL);
   //-->
   </script>
   </td>
   
</tr>


Re: javascript object refresh

Reply #4
I have found a solution. Thanks!!