The page style is:
The left Ajax container is the function tree, and the right Ajax container is the details of a node in the function tree.
The Ajax container on the right contains a connection, which is used to open a pop-up window to further display the affiliated content of a node in the function tree.
The click event on the right side of the figure that links "This test point step information" is:
Scriptmanager. registerstartupscript (updatepanel1, GetType (), "onclick", "showtab ('" + hiddpropid. Value + "')", true );
Open the pop-up page, where hiddpropid is a hidden control, and its value is the ID value of the node currently clicked in the function tree.
Problem: The first click of the link can be displayed, but the next click cannot be displayed. (it may be because the Ajax container has not been refreshed. You can solve this problem by refreshing it, however, the current page and function tree expand node status may be affected, so the solution is not refreshed .)
Use solutions for this problem:
You cannot click the link in the background code to enable the pop-up window function. Because the Ajax container is not updated, the background is not called. Therefore, you should try to open the pop-up window in the foreground:
That is, add the call foreground event in the link: onclientclick = 'showtab ()'
The JS event is:
Function showtab (){
// Document. getelementbyid ("lnktab"). Click ();
VaR id = Document. getelementbyid ('hiddpropid '). value;
Pop = new popup ({contenttype: 1, isreloadonclose: false, width: 600, height: 500 });
Pop. setcontent ("title", "test point step ");
Pop. setcontent ("contenturl", "testtabmanage. aspx? Itemid = "+ id );
Pop. Build ();
Pop. Show ();
// Window. showmodaldialog ('testtabmanage. aspx? Itemid = '+ id, '', 'dialogheight: 500px; dialogwidth: 600px; center: Yes; left: 0; toolbar: No; Location: Yes; menubar: No; scrollbars: yes; resizable: No; Status: no ');
}
Obtain the value of 'ddpropid 'in the JS event, that is, the ID value of the function tree node. the pop-up window is displayed.
Other questions:
In onclientclick = 'showtab (<% = ID %>) ', ID is set as the id value of the function tree node in the background. This value is directly used when the js method is called. However, the debugging result is as follows: the actual id value is not obtained, but (<% = ID %>) is passed as a String constant.
Unsolved problem: Why not parse (<% = ID %> )?