Handling AutoPostback without Javascript Support
-
Hi Pals, I am facing a problem in working with some Server Side events of controls () like
CheckBox
,RadioButton
,LinkButton
,DropDownList
. To elaborate, I would say, since to handle the events likeSelectedIndexChanged
ofDropDownlist
on Server Side, we usually set theAutoPostback
property to TRUE. Well, this ends up in a javascript code generation with the Response to the Web Client. But If the Javascript is not enabled (or not supported), then this doesn't work. there is my problem. I have to implement the entire site, with **minimal (None if possible), support of javascript.**Please suggest a solution for this. Thanx! Atul Kale MCSD, MCT Sr. Software Engineer XcelVision Technologies Ltd. -
Hi Pals, I am facing a problem in working with some Server Side events of controls () like
CheckBox
,RadioButton
,LinkButton
,DropDownList
. To elaborate, I would say, since to handle the events likeSelectedIndexChanged
ofDropDownlist
on Server Side, we usually set theAutoPostback
property to TRUE. Well, this ends up in a javascript code generation with the Response to the Web Client. But If the Javascript is not enabled (or not supported), then this doesn't work. there is my problem. I have to implement the entire site, with **minimal (None if possible), support of javascript.**Please suggest a solution for this. Thanx! Atul Kale MCSD, MCT Sr. Software Engineer XcelVision Technologies Ltd.There is no solution. HTML does not define automatic browser-handled events except for
<input type="submit">
and<intput type="reset">
(as far as controls go). So, unless the event is handled by client-side script (since server-side script is not an issue once the browser has the page), there is no possible way to accomplish this. Workarounds could include having a button next to each combo, etc., that submits the changes (though have autopostback for people that aren't overly paranoid). You could also just inform the user that JavaScript has to enabled past a certain point. Many sites - especially government sites where the "webmasters" don't know crap about design and browser compatibility - do this. The other option would be to have two pages, having the "light" one detect for the presence of JavaScript and forwarding the browser to the "heavy" one (this could be done with one call, sincelocation.href = 'new url';
assumes that JavaScript is there since it is required to work).-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
There is no solution. HTML does not define automatic browser-handled events except for
<input type="submit">
and<intput type="reset">
(as far as controls go). So, unless the event is handled by client-side script (since server-side script is not an issue once the browser has the page), there is no possible way to accomplish this. Workarounds could include having a button next to each combo, etc., that submits the changes (though have autopostback for people that aren't overly paranoid). You could also just inform the user that JavaScript has to enabled past a certain point. Many sites - especially government sites where the "webmasters" don't know crap about design and browser compatibility - do this. The other option would be to have two pages, having the "light" one detect for the presence of JavaScript and forwarding the browser to the "heavy" one (this could be done with one call, sincelocation.href = 'new url';
assumes that JavaScript is there since it is required to work).-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
Thanx Heath! U R Right there! Its hell of a job to convince the Client all these issues. I'll try to convince the use of javascript in this case. cauz anyways, the workaround was always an option for backup! regards Atul Kale MCSD, MCT netdecisions Ltd.