Thank you for your reply. Here is my new idea
Goal:
I need to create an onclick event for a button. When click the button:
1. run code to refresh the menu frame:
parent.menu.location.reload(true);
2. run code to highlight a node in the menu frame
How:
Code:
function syncNode(id)
{
parent.menu.location.reload(true);
parent.frames("menu").TreeView1.CollapseAll();
parent.frames("menu").TreeView1.SelectNodeById(id) ;
parent.frames("menu").TreeView1.Render();
return true;
}
It won't work. Because when reload() the page lost the value of id
I guess if I can declare a sort of session variable in the html page,
then:
1. Every time I load the page, the page will check the session
variable's value (How to do this in aspx HTML code?)
2. In the onclick event, run another method:
Code:
function set_currid()
{
1. assign a new value to the sesstion variable
2. parent.menu.location.reload(true);
}
I also need to run another function somewhere in the page's HTML code
to do the highlight:
Code:
function highlight(id)
{
parent.frames("menu").TreeView1.CollapseAll();
parent.frames("menu").TreeView1.SelectNodeById(id) ;
parent.frames("menu").TreeView1.Render();
}
By doing this, because the page will have a new session variable
everytime it starts, so the it will highlight the node I want, whose id
is passed by the button's click event.
But please help, although I think this is the right way to do, I don't
know much javascript, can someone tell me how to write the code in
javascript/ and how to run the javascript in a html page?
Thank you very much.