Skip to content

Commit 7cf4f82

Browse files
Update web-forms.js
Support for specifying the location of the tag to place the data received from the server.
1 parent 25ab2e6 commit 7cf4f82

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

web-forms.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ function PostBack(obj, ViewState)
130130

131131
if (ViewState)
132132
{
133-
PostBackOptions.ResponseLocation.prepend(TmpDiv);
133+
if (typeof ViewState === "string")
134+
cb_GetElementByElementPlace(ViewState).innerHTML = TmpDiv.outerHTML;
135+
else
136+
PostBackOptions.ResponseLocation.prepend(TmpDiv);
134137
cb_SetPostBackFunctionToSubmit(PostBackOptions.ResponseLocation.getElementsByTagName("div")[0]);
135138
}
136139
else
@@ -237,7 +240,10 @@ function GetBack(FormAction, ViewState)
237240

238241
if (ViewState)
239242
{
240-
PostBackOptions.ResponseLocation.prepend(TmpDiv);
243+
if (typeof ViewState === "string")
244+
cb_GetElementByElementPlace(ViewState).innerHTML = TmpDiv.outerHTML;
245+
else
246+
PostBackOptions.ResponseLocation.prepend(TmpDiv);
241247
cb_SetPostBackFunctionToSubmit(PostBackOptions.ResponseLocation.getElementsByTagName("div")[0]);
242248
}
243249
else

0 commit comments

Comments
 (0)