Welcome Guest Search | Active Topics | Sign In | Register

eo treeview doubling the root nodes when tree view is presented in a jquery dialog Options
Kenneth
Posted: Thursday, March 18, 2010 3:45:55 PM
Rank: Newbie
Groups: Member

Joined: 3/4/2010
Posts: 5
I am presenting the tree view in a jquery dialog but the root nodes are displaying twice. the two on the bottom are the actual nodes that function with populate node server calls. the top two do nothing but show up as a mirror of the bottom two. who work when you click the node.

Kenneth

p.s. is there a way to upload an image?
eo_support
Posted: Thursday, March 18, 2010 4:16:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This is a known issue for JQuery. For some reason JQuery unnecessarily executes inline JavaScript twice. You can search for "JQuery JavaScript executes twice" and you will see many other people run into the same problem as well.

The problem appears to have to do with JQuery's document.ready handler. However we are not sure because we are not JQuery expert. If it indeed has to do with document.ready, you can handle our control's ClientSideOnLoad instead of handling document.ready.

Thanks!
eo_support
Posted: Thursday, March 18, 2010 7:33:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Kenneth wrote:
p.s. is there a way to upload an image?


Sorry we missed this question. You will not be able to upload an image to the forum. You can only host the image somewhere else and then link to it.

Thanks!
Kenneth
Posted: Friday, March 19, 2010 10:28:12 AM
Rank: Newbie
Groups: Member

Joined: 3/4/2010
Posts: 5
j query works by writing HTML to the page instead of creating elements. they have discovered that this approach is 10 times faster than using document.createElement.

so the issue is occurring when the tree view is removed from the page and rewritten to the page inside the HTML markup that defines the dialog ui markup. basically the java script that the eo object is rendering is executed twice because of this.
Kenneth
Posted: Friday, March 19, 2010 11:33:19 AM
Rank: Newbie
Groups: Member

Joined: 3/4/2010
Posts: 5
I have another question. how do I dynamically create a navigator item client side using java script?
eo_support
Posted: Friday, March 19, 2010 12:13:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Kenneth wrote:
j query works by writing HTML to the page instead of creating elements. they have discovered that this approach is 10 times faster than using document.createElement.

so the issue is occurring when the tree view is removed from the page and rewritten to the page inside the HTML markup that defines the dialog ui markup. basically the java script that the eo object is rendering is executed twice because of this.


Hi,

Yes. In fact it appears that JQuery explicitly extracts JavaScript code segments once they've written the HTML out and then execute those extracted JavaScript. The code has already been executed by the browser so it should no be executed again. That does not leave us much option because we can't really code everywhere to fend off issues caused by our code being incorrectly executed multiple times (Consider sometimes calling the same code multiple times is intended (for example, to add an entry to a log).

If JQuery's dialog is what triggered the problem, then you can probably replace it with our dialog control. Our own control should not have such issues.

Thanks!
eo_support
Posted: Friday, March 19, 2010 12:15:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Kenneth wrote:
I have another question. how do I dynamically create a navigator item client side using java script?


Hi,

Unfortunately you can not do that. You can modify an existing item, such as modify the item's icon or text, even to show or hide it with JavaScript, but you can not dynamically create an item from the client side.

The only thing that is close to this is load on demand feature. Load on demand can load child items on the client side without posting back the page and it can be triggered through JavaScript.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.