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) */
2
2
3
3
/* Start Options */
4
4
@@ -8,13 +8,12 @@ PostBackOptions.UseConnectionErrorMessage = true;
8
8
PostBackOptions . ConnectionErrorMessage = "Connection Error" ;
9
9
PostBackOptions . AutoSetSubmitOnClick = true ;
10
10
PostBackOptions . SendDataOnlyByPostMethod = false ;
11
- PostBackOptions . ResponseLocation = null ;
12
11
PostBackOptions . WebFormsTagsBackgroundColor = "#eee" ;
13
12
PostBackOptions . SetResponseInsideDivTag = true ;
14
13
15
- function cb_SetResponseLocation ( )
14
+ function cb_GetResponseLocation ( )
16
15
{
17
- PostBackOptions . ResponseLocation = document . body ;
16
+ return document . body ;
18
17
}
19
18
20
19
/* End Options */
@@ -53,7 +52,6 @@ function cb_SetPostBackFunctionToSubmit(obj)
53
52
54
53
window . onload = function ( )
55
54
{
56
- cb_SetResponseLocation ( ) ;
57
55
cb_Initialization ( ) ;
58
56
} ;
59
57
@@ -163,16 +161,16 @@ function PostBack(obj, ViewState)
163
161
}
164
162
else
165
163
{
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 ] ) ;
168
166
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 ;
170
168
}
171
169
}
172
170
else
173
171
{
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 ( ) ) ;
176
174
}
177
175
178
176
Form . focus ( ) ;
@@ -290,16 +288,16 @@ function GetBack(FormAction, ViewState)
290
288
}
291
289
else
292
290
{
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 ] ) ;
295
293
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 ;
297
295
}
298
296
}
299
297
else
300
298
{
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 ( ) ) ;
303
301
}
304
302
}
305
303
}
0 commit comments