Click here to Skip to main content
15,887,214 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHTML (aspx, ascx, html pages) Blacked Out Pin
jchandramouli13-Dec-09 21:29
jchandramouli13-Dec-09 21:29 
AnswerRe: HTML (aspx, ascx, html pages) Blacked Out [modified] Pin
plecco22-Dec-09 9:12
plecco22-Dec-09 9:12 
QuestionHow to private User On download pdf files Pin
en.Mahdi13-Dec-09 18:49
en.Mahdi13-Dec-09 18:49 
AnswerRe: How to private User On download pdf files [modified] Pin
plecco22-Dec-09 9:14
plecco22-Dec-09 9:14 
AnswerRe: How to private User On download pdf files Pin
marita724-Jan-10 5:38
marita724-Jan-10 5:38 
QuestionSending Request and Reading Response from Webservice using XML API Pin
shaina223112-Dec-09 1:18
shaina223112-Dec-09 1:18 
AnswerRe: Sending Request and Reading Response from Webservice using XML API Pin
shaina223112-Dec-09 1:19
shaina223112-Dec-09 1:19 
Questionajax synchronous request, page refresh and the error Pin
Jayapal Chandran12-Dec-09 0:37
Jayapal Chandran12-Dec-09 0:37 
Hi,
I have been using asynchronous requests for a long time. so the response was processed in a callback function. I thought of not using async so i made synchronous requests. The reason is that i dont have to have two more lines for checking the status and the onreadystatechange....

my synchronous requests would be like this...

var jax = createAjax(); // this function returns the XMLHTTPRequest object<br />
jax.open('POST',url,false); //here false is to do sync request.<br />
jax.setRequestHeader('Content-Type: application/x-www-form-urlencoded');<br />
jax.send(parameters);<br />
// once the above line is executed the process waits for the response and when it gets the response form the server then the next line is executed.<br />
alert(jax.responseText); // here i process the response text.


so from the code you can understand that there is no need of a callback function and if conditions to check ready state... ...

So there is no problem in the above code. The problem araises here...

if i press the F5 (refresh) key or do a page refresh when the process is waiting for the response i get an (NS ERROR - firefox ( i have not yet checked that in IE browsers) (javascript error) though the process completes successfully. why?

Do we have to check whether the page is navigating away while in synchronous operation and abort the request?

or what could be the reason for the error. This will not happen in async requests because that is also the reason for async...

so i give a sync request and before the response is received if i navigate away or reload the page i get the error.

???

Today's Beautiful Moments are
Tomorrow's Beautiful Memories

QuestionHome page not Shown Pin
mikobi10-Dec-09 20:18
mikobi10-Dec-09 20:18 
AnswerRe: Home page not Shown Pin
Ashfield11-Dec-09 1:16
Ashfield11-Dec-09 1:16 
AnswerRe: Home page not Shown [modified] Pin
plecco22-Dec-09 9:17
plecco22-Dec-09 9:17 
NewsFree Support for Getting Started with Windows Azure Pin
brucedkyle10-Dec-09 8:11
brucedkyle10-Dec-09 8:11 
GeneralRe: Free Support for Getting Started with Windows Azure via Microsoft's Front Runner Program is excellent, the dev tools are free too! Pin
GoAzure12-Apr-10 17:21
GoAzure12-Apr-10 17:21 
GeneralAndroid & Javascript Pin
Bassam Abdul-Baki5-Dec-09 12:15
professionalBassam Abdul-Baki5-Dec-09 12:15 
QuestionPage Fade Out To Focus On Popup Pin
Abydosgater5-Dec-09 7:38
Abydosgater5-Dec-09 7:38 
AnswerRe: Page Fade Out To Focus On Popup Pin
enhzflep5-Dec-09 12:26
enhzflep5-Dec-09 12:26 
GeneralRe: Page Fade Out To Focus On Popup Pin
Abydosgater5-Dec-09 14:10
Abydosgater5-Dec-09 14:10 
AnswerRe: Page Fade Out To Focus On Popup [modified] Pin
plecco22-Dec-09 9:21
plecco22-Dec-09 9:21 
QuestionWebservices for inserting values from one server to another server using C#.NET Pin
cbe_pav4-Dec-09 17:54
cbe_pav4-Dec-09 17:54 
AnswerRe: Webservices for inserting values from one server to another server using C#.NET Pin
The Man from U.N.C.L.E.5-Dec-09 4:59
The Man from U.N.C.L.E.5-Dec-09 4:59 
AnswerRe: Webservices for inserting values from one server to another server using C#.NET [modified] Pin
plecco22-Dec-09 9:24
plecco22-Dec-09 9:24 
QuestionVirtual keyboard using JSP Pin
omi1407883-Dec-09 6:23
omi1407883-Dec-09 6:23 
AnswerRe: Virtual keyboard using JSP Pin
The Man from U.N.C.L.E.5-Dec-09 5:03
The Man from U.N.C.L.E.5-Dec-09 5:03 
GeneralRe: Virtual keyboard using JSP Pin
Amanda Grey8-Dec-09 21:37
Amanda Grey8-Dec-09 21:37 
Question[Message Deleted] Pin
emurf2-Dec-09 10:29
emurf2-Dec-09 10:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.