Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Why do PostBacks Work with JavaScript Disabled

Reply
Thread Tools

Why do PostBacks Work with JavaScript Disabled

 
 
Frankie
Guest
Posts: n/a
 
      10-08-2005
Just doing some testing here to see what happens when JavaScript is
disabled. I was told somewhere along the line that PostBacks would fail
because they rely on JavaScript:
function __doPostBack(eventTarget, eventArgument) {...

But my page is still posting back just fine with JavaScript disabled (while
other JavaScript-dependent features are totally broken).

So, how do PostBacks still happen?

Thanks!


 
Reply With Quote
 
 
 
 
Nick Malik [Microsoft]
Guest
Posts: n/a
 
      10-08-2005
> Just doing some testing here to see what happens when JavaScript is
> disabled. I was told somewhere along the line that PostBacks would fail
> because they rely on JavaScript:
> function __doPostBack(eventTarget, eventArgument) {...
>
> But my page is still posting back just fine with JavaScript disabled
> (while other JavaScript-dependent features are totally broken).
>
> So, how do PostBacks still happen?
>


When a browser sends a request for a page to ASP.Net, the system will
inspect the headers to see if Javascript is allowed.

This happens before the form comes down to the client. Remember that
ASP.Net is writing the code that the browser uses.

If Javascript is allowed, then the code and HTML that is emitted uses
Javascript. If not, ASP.Net will emit different HTML code so that your page
will use traditional form POST.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX - Partial Postbacks are now Full Postbacks ?!! gregfocker@earthlink.net ASP .Net 0 01-25-2007 07:04 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
DataGrid Controls Don't Work with JavaScript Disabled Steve Murphy ASP .Net 3 08-07-2005 02:14 PM
SmartNavigation doesn't work on first postback (but on all subsequent postbacks) Ryan Breakspear ASP .Net 0 11-18-2003 05:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57