I'm having issues when trying to run my web app. I'm getting an expression expected error at runtime on the portion of my code that is designed to retain the screen position of multiple drag panels.
should return the id of the uniquely named panel so it can be used later in code to identify the _DragPanelExtender.BehaviorIDCode:var target = $this).attr("id");
I haven't been able to verify if the dragPanel's id name is being used, it just errors out here. Can anyone help with the following code, where I am attempting to preserve the position of multiple dragPanel's after postback? Thanks.Code:$find('<%=' + target + '_DragPanelExtender.BehaviorID%>').set_location(new Sys.UI.Point(parseInt(temp[0]), parseInt(temp[1])));
Code:function pageLoad() { //get element id name of button clicked var target = $(this).attr("id"); // call the savePanelPosition when the panel is moved $find(target).add_move(savePanelPosition); var elem = $get("<%=HiddenField1.ClientID%>"); if (elem.value != "0") { var temp = new Array(); temp = elem.value.split(';'); // set the position of the panel manually with the retrieve value $find('<%=' + target + '_DragPanelExtender.BehaviorID%>').set_location(new Sys.UI.Point(parseInt(temp[0]), parseInt(temp[1]))); } } function savePanelPosition() { //get element id name of button clicked var target = $(this).attr("id"); var elem = $find(target).get_element(); var loc = $common.getLocation(elem); var elem1 = $get("<%=HiddenField1.ClientID%>"); // store the value in the hidden field elem1.value = loc.x + ';' + loc.y; }




Reply With Quote
