I am using a webtree control to control events on the web page. My problem is when I click on a child in the webtree I can identify the index, but I am having a problem posting that index to the code-behind file or the web page.
Here is my code
[CODE=javascript]function AfterNodeSelCha nge(treeId, nodeId, button) {
var node = igtree_getNodeB yId(nodeId);
if(node == null)
return;
var eventName = node.getText(); //Get the node text
// alert(eventName );
var EvName; // evenet process name
var nIndex; // get the county index
switch(eventNam e)
{
// Appling County
case "APPLING": //Get Appling county-now activate search
{
nIndex = node.getIndex() ;
if(nIndex == 0)
{
var ZIndex = documment.
alert(nIndex); // for debug purpose
// this code does not work to post an image on the web page.
// or change the text on the label - Can you help???????????
txtName.Text = "Appling";
var NameImg = document.getEle mentById("ImgCo unty");
NameImg.ImgeUrl ="./images/appling.gif";
var nameCnty =document.getEl ementById("lblC ounty");
nameCnty.Text=" APPLING;
//
}
}
}
[/CODE] ------------
I want to post that index in this C# function
[CODE=cpp] protected void sRTree_NodeClic ked(object sender, Infragistics.We bUI.UltraWebNav igator.WebTreeN odeEventArgs e)
{
string nIndex = String.Empty;
MIISING IS THE CODE TO ACCESS THAT INDEX IN JAVASCRIPT
// cNode = this.sRTree.Nod es.Index(nIndex );
switch(ZIndex)
{
case 0: // "APPLING":
{
ZIndex = 0;
nIndex = string.Empty;
ImgCounty.Image Url = "./Counties/Appling.gif";
lblCounty.Text = "Appling";
txtScrhCounty.T ext = "Appling";
}
}
}[/CODE]
Here is my code
[CODE=javascript]function AfterNodeSelCha nge(treeId, nodeId, button) {
var node = igtree_getNodeB yId(nodeId);
if(node == null)
return;
var eventName = node.getText(); //Get the node text
// alert(eventName );
var EvName; // evenet process name
var nIndex; // get the county index
switch(eventNam e)
{
// Appling County
case "APPLING": //Get Appling county-now activate search
{
nIndex = node.getIndex() ;
if(nIndex == 0)
{
var ZIndex = documment.
alert(nIndex); // for debug purpose
// this code does not work to post an image on the web page.
// or change the text on the label - Can you help???????????
txtName.Text = "Appling";
var NameImg = document.getEle mentById("ImgCo unty");
NameImg.ImgeUrl ="./images/appling.gif";
var nameCnty =document.getEl ementById("lblC ounty");
nameCnty.Text=" APPLING;
//
}
}
}
[/CODE] ------------
I want to post that index in this C# function
[CODE=cpp] protected void sRTree_NodeClic ked(object sender, Infragistics.We bUI.UltraWebNav igator.WebTreeN odeEventArgs e)
{
string nIndex = String.Empty;
MIISING IS THE CODE TO ACCESS THAT INDEX IN JAVASCRIPT
// cNode = this.sRTree.Nod es.Index(nIndex );
switch(ZIndex)
{
case 0: // "APPLING":
{
ZIndex = 0;
nIndex = string.Empty;
ImgCounty.Image Url = "./Counties/Appling.gif";
lblCounty.Text = "Appling";
txtScrhCounty.T ext = "Appling";
}
}
}[/CODE]