Tag - JavaScript

How to disable some context menu items on Telerik TreeView

There is an event named "OnClientContextMenuShowing" for Rad Treeview that calls javascipt function and passes 2 arguments "sender, args".The Args parameter contains The current selected TreeNode and Context Menu Items.You can enable or disable any Context menu item based on any attributes for the Current Selected Tree Node.Here is a...

JavaScript regular expression to match a comma delimited list

This method uses the JavaScript String's match() method to parse a comma delimited list and show its content in a Panel control.You can try it here http://jsfiddle.net/38tXU/function parseList(list) { var reg = list.match(/\w+(,\w+)*/g); document.getElementById('pnl').innerHTML = 'Total length:' + reg.length + '<br />'; ...