Ctreeview : Ie Prompt "long Script Boxes"

Hi!

I have an huge Tree.

this tree appear correctly on both browser, (firefox and IE).

But, on ie, after my script was collecting all data, when the widget script works to display the tree, IE show prompt me (several times … ) a box to ask me if I wish to cancel or continue the execution of the script which could crash my IE browser.

here is the error message on the microsoft website : http://support.microsoft.com/kb/175500/en#LetMeFixItMyselfAlways

So I could add a registry like it is explain on the microsoft website and so I don’t have any problem… for my computer… not for the visitor of the website! so, as web developper, it isn’t a solution for me.

So, is there an other solution for this?

there is maybe an other widget than $this->widget(‘CTreeView’,array( … )); ?

or do you have other suggestion/ideas?

here are the JS/css dynamicly loaded on the page (don’t know if it can help)


 <script type="text/javascript" src="/pilottool/javascript/common/jquery.min.js"></script>

<script type="text/javascript" src="/pilottool/javascript/common/jquery.dataTables.min.js"></script>

<link rel="stylesheet" type="text/css" href="/pilottool/assets/7e7ecce5/treeview/jquery.treeview.css" />



I’m pretty sure that come from the widget because :

  • on the 1st loading I keep some data in session, and on the 2nd loading, ie still prompt me the box but don’t execute my personnal script.

  • I made an other view mannually with array to display same data and I don’t have any problem (But I still need a tree view.)

here is my declaration :




$this->widget('CTreeView',array(

	'data'=>$tree,

	'animated'=>'fast', 

	'collapsed'=>true,

	'htmlOptions'=>array(

	     'class'=>'filetree',

	),

));



thanks in advance for any help! (and sorry for my english.)

Vincent

Have you tried loading the tree nodes on demand when they’re expanded? It should speed up execution significantly and reduce the overhead. I don’t know if the built in tree view supports it, but others definitely do.

Have a look at jsTree.

It will be more complicated to implement, but if your tree is causing script warnings, you really should consider it.

the problem comes from the fact that I need the last node (which have rights linked) to know if I have to show the tree branch or not.

if the user have no right under a node, all the node will be hidden, and the same with the node above ect.

So I’m forced to load all the node to see if the user has rights to see branch/node.

Nothing in my code could prevent IE to show this box?

I’ll also try to load data with ajax. that could optimize the loading speed but I’m not sure about how to do this.

I’ll try to learn that now and warn you if it is better or not.

thanks.