• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ajax call to server side page causes the initial page to get stuck

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

I have a default.aspx page in which I use javascript with Ajax to go and retreive some data from another server side page (callback.aspx). but when I do a loop in this server side page (callback.aspx), my initial page (default.aspx) gets stuck and I can't do anythin anymore on the page until the server side page finishes it's code....

I use a loop to check wether there is new data in a database....
I can solve this by doing a loop on the client side instead of the server side.... but this polling causes me, to use, up to 0.6 kb per second of bandwith.... after a while this is a lot! (I do a setrequestheader and a getresponsetext every second).

So my problem could be solved by either making it so that my initial page does not get stuck while a some code is running server side. OR making it so that the polling of my page does not require so much bandwith....

Can anyone help?

thank you,

Erdem
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you specifying false for the 3rd parameter of the XMLHttpRequest open call? That will cause a stall such as you are describing.
[ September 18, 2005: Message edited by: Bear Bibeault ]
 
Erdem geen
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ahhh ok,

I used true instead of false and got an error....
does the parameter "true" make the javascript code run anyway and then probably gives an error when i try to use responsetext?

Erdem

:roll:
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a simple framework to use the XMLHttpRequest Object:


Eric
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic