1- /* WebFormsJS 1.2 - Providing Infrastructure For Web Controls In CodeBehind Framework Owned By Elanat (elanat.net) */
1+ /* WebFormsJS 1.3 - Providing Infrastructure For Web Controls In CodeBehind Framework Owned By Elanat (elanat.net) */
22
33/* Start Options */
44
@@ -8,13 +8,12 @@ PostBackOptions.UseConnectionErrorMessage = true;
88PostBackOptions . ConnectionErrorMessage = "Connection Error" ;
99PostBackOptions . AutoSetSubmitOnClick = true ;
1010PostBackOptions . SendDataOnlyByPostMethod = false ;
11- PostBackOptions . ResponseLocation = null ;
1211PostBackOptions . WebFormsTagsBackgroundColor = "#eee" ;
1312PostBackOptions . SetResponseInsideDivTag = true ;
1413
15- function cb_SetResponseLocation ( )
14+ function cb_GetResponseLocation ( )
1615{
17- PostBackOptions . ResponseLocation = document . body ;
16+ return document . body ;
1817}
1918
2019/* End Options */
@@ -53,7 +52,6 @@ function cb_SetPostBackFunctionToSubmit(obj)
5352
5453window . onload = function ( )
5554{
56- cb_SetResponseLocation ( ) ;
5755 cb_Initialization ( ) ;
5856} ;
5957
@@ -163,16 +161,16 @@ function PostBack(obj, ViewState)
163161 }
164162 else
165163 {
166- PostBackOptions . ResponseLocation . prepend ( TmpDiv ) ;
167- cb_Initialization ( PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] ) ;
164+ cb_GetResponseLocation ( ) . prepend ( TmpDiv ) ;
165+ cb_Initialization ( cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] ) ;
168166 if ( ! PostBackOptions . SetResponseInsideDivTag )
169- PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] . outerHTML = PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] . innerHTML ;
167+ cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] . outerHTML = cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] . innerHTML ;
170168 }
171169 }
172170 else
173171 {
174- PostBackOptions . ResponseLocation . innerHTML = ( PostBackOptions . SetResponseInsideDivTag ) ? TmpDiv . outerHTML : TmpDiv . innerHTML ;
175- cb_Initialization ( PostBackOptions . ResponseLocation ) ;
172+ cb_GetResponseLocation ( ) . innerHTML = ( PostBackOptions . SetResponseInsideDivTag ) ? TmpDiv . outerHTML : TmpDiv . innerHTML ;
173+ cb_Initialization ( cb_GetResponseLocation ( ) ) ;
176174 }
177175
178176 Form . focus ( ) ;
@@ -290,16 +288,16 @@ function GetBack(FormAction, ViewState)
290288 }
291289 else
292290 {
293- PostBackOptions . ResponseLocation . prepend ( TmpDiv ) ;
294- cb_Initialization ( PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] ) ;
291+ cb_GetResponseLocation ( ) . prepend ( TmpDiv ) ;
292+ cb_Initialization ( cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] ) ;
295293 if ( ! PostBackOptions . SetResponseInsideDivTag )
296- PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] . outerHTML = PostBackOptions . ResponseLocation . getElementsByTagName ( "div" ) [ 0 ] . innerHTML ;
294+ cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] . outerHTML = cb_GetResponseLocation ( ) . getElementsByTagName ( "div" ) [ 0 ] . innerHTML ;
297295 }
298296 }
299297 else
300298 {
301- PostBackOptions . ResponseLocation . innerHTML = ( PostBackOptions . SetResponseInsideDivTag ) ? TmpDiv . outerHTML : TmpDiv . innerHTML ;
302- cb_Initialization ( PostBackOptions . ResponseLocation ) ;
299+ cb_GetResponseLocation ( ) . innerHTML = ( PostBackOptions . SetResponseInsideDivTag ) ? TmpDiv . outerHTML : TmpDiv . innerHTML ;
300+ cb_Initialization ( cb_GetResponseLocation ( ) ) ;
303301 }
304302 }
305303 }
0 commit comments