Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am constructing a sitemap in a hyperlink wich I give the 'text' and a 'valuepath' that sitemap is referent to a treeview wich only has two levels parent and child...

I clear the treeview (treeview.nodes.clear) to put only two levels and he loses the valuepath..
Posted
Comments
jim lahey 7-Nov-12 6:33am    
not clear.
hh_7 7-Nov-12 6:55am    
I need to roll back on the nodes each time i click on sitemap but i clear the treeview so he doesn´t change the tree...

1 solution

you can try event.preventDefault() method for that.

eg.

JavaScript
//put it in doument ready method.as globle var
var isToPreventDefault=false;


//make is ture on any event or your condition.
if(yourCondition){
isToPreventDefault = true;
}


//put it in doument ready method.
 
$("#selectorOfYourAnchor").click(function(e){
if(isToPreventDefault )
event.preventDefault();
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900