Skip to content

Commit e8f9941

Browse files
Update web-forms.js
Fixing server response location problem
1 parent 749efbf commit e8f9941

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

web-forms.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ PostBackOptions.UseConnectionErrorMessage = true;
88
PostBackOptions.ConnectionErrorMessage = "Connection Error";
99
PostBackOptions.AutoSetSubmitOnClick = true;
1010
PostBackOptions.SendDataOnlyByPostMethod = false;
11-
PostBackOptions.ResponseLocation = document.body;
11+
PostBackOptions.ResponseLocation = null;
12+
13+
function cb_SetResponseLocation()
14+
{
15+
PostBackOptions.ResponseLocation = document.body;
16+
}
1217

1318
/* End Options */
1419

@@ -43,9 +48,11 @@ function cb_SetPostBackFunctionToSubmit(obj)
4348
InputElement.setAttribute("onclick", "PostBack(this)");
4449
});
4550
}
51+
4652
window.onload = function ()
4753
{
48-
cb_SetPostBackFunctionToSubmit()
54+
cb_SetResponseLocation();
55+
cb_SetPostBackFunctionToSubmit();
4956
};
5057

5158
/* End Event */
@@ -118,7 +125,7 @@ function PostBack(obj, ViewState)
118125
else
119126
{
120127
var TmpDiv = document.createElement("div");
121-
TmpDiv.appendChild(HttpResult.toDOM());
128+
TmpDiv.innerHTML = HttpResult.toDOM();
122129
cb_AppendJavaScriptTag(HttpResult);
123130

124131
if (ViewState)
@@ -225,7 +232,7 @@ function GetBack(FormAction, ViewState)
225232
else
226233
{
227234
var TmpDiv = document.createElement("div");
228-
TmpDiv.appendChild(HttpResult.toDOM());
235+
TmpDiv.innerHTML = HttpResult.toDOM();
229236
cb_AppendJavaScriptTag(HttpResult);
230237

231238
if (ViewState)

0 commit comments

Comments
 (0)