Click here to Skip to main content
15,904,638 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: randomly generate a number every X minutes (php) Pin
Terry Valladon9-Feb-10 8:33
Terry Valladon9-Feb-10 8:33 
QuestionTimeout Alert Issue....Javascript Function with ASP.net application Pin
PDTUM15-Dec-09 9:08
PDTUM15-Dec-09 9:08 
AnswerRe: Timeout Alert Issue....Javascript Function with ASP.net application Pin
John Bracey15-Dec-09 9:37
John Bracey15-Dec-09 9:37 
QuestionHow to pass username of window authentication to web application. Pin
sabby200615-Dec-09 2:52
sabby200615-Dec-09 2:52 
QuestionHow to pass username of window authentication to web application. Pin
sabby200615-Dec-09 2:50
sabby200615-Dec-09 2:50 
AnswerRe: How to pass username of window authentication to web application. Pin
Saša Dragičević15-Dec-09 3:27
Saša Dragičević15-Dec-09 3:27 
AnswerRe: How to pass username of window authentication to web application. Pin
The Man from U.N.C.L.E.15-Dec-09 10:19
The Man from U.N.C.L.E.15-Dec-09 10:19 
Questioncan we create our own home Page in YahooHome Page. Pin
shiva.kore14-Dec-09 18:54
shiva.kore14-Dec-09 18:54 
AnswerRe: can we create our own home Page in YahooHome Page. Pin
Ashfield14-Dec-09 21:42
Ashfield14-Dec-09 21:42 
QuestionMS SharePoint & Dynamics Pin
Karina.R14-Dec-09 0:46
Karina.R14-Dec-09 0:46 
AnswerRe: MS SharePoint & Dynamics Pin
Richard MacCutchan14-Dec-09 23:06
mveRichard MacCutchan14-Dec-09 23:06 
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 

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.