Click here to Skip to main content
15,920,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Expert,
I am using update panel for certain portion in asp.net webpage for ajax.

Its working good.

I that portion there is one textbox for current date.
And i have called javascript on it.
But due to ajax its not working. If I removed update panel then its working.

and i have define script manager in that form.

Please Help me.

Thanks in advance.
Posted
Comments
D K N T H 6-Dec-11 23:58pm    
can you show as ur codes?

1 solution

Hi,
How did you called javascript in that page. Can you post some sample code here?
 
Share this answer
 
Comments
udusat13 7-Dec-11 1:50am    
I am showing wait image for longRunning process.
and i am refering this code from u r site.

http://www.codeproject.com/KB/aspnet/WaitImageBoxWhilePagePost.aspx

and i am calling the ur javascript on button event.
without updatepanel its working fine but when i put this in update panel then it remains blocked.
udusat13 7-Dec-11 1:52am    
This is my javascript code

<script type="text/javascript">


function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}

function pageLoad() {
//PageMethods.DoLongJob("Start", SucceededStartCallback, FailedStartCallback);
InitDialogs();
Loading(false);

}


function UpdateImg(ctrl, imgsrc) {
var img = document.getElementById(ctrl);
img.src = imgsrc;
}



// sets up all of the YUI dialog boxes
function InitDialogs() {

DialogBox_Loading = new YAHOO.widget.Panel("waitBox", { fixedcenter: true, modal: true, visible: true, width: "230px", close: false, draggable: true });
DialogBox_Loading.setHeader("Loading, please wait...");
DialogBox_Loading.setBody('<div style="text-align:center;"><img src="tt_spinner.gif" id="Image1" /></div>');
DialogBox_Loading.render(document.body);
}

function Loading(b) {
if (b == true ) {

DialogBox_Loading.show();

}
else {
DialogBox_Loading.hide();
}
}

addLoadEvent(function() {
pageLoad();
})

</script>

and i am calling it from showButton

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900