• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Problem in simulating progress bar using Ajax

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends ,

I was just trying out an AJAX based program, in which i simulate progress bar...by using a method similar to polling. It works fine, in Firefox or Google Chrome browser, but IE 7 gives "Stack overflow at line:0" alert message after first request is made.

Things i am using :-
jdk 1.6
Tomcat 5.5
IE 7
Firefox 3.0.4
Windows Vista
Eclipse 3.1

and this is what i briefly do:-

1) i make the first request to server through ajax by clicking a button.
2) on Server when request is received ... server increments a counter and sends back that value to client
3) before sending back the counter i make the thread to sleep for few seconds in my servlet....so that i can simulate or get the feel of delay as we see in progress bar
4) i get the counter value in response xml
5) according to the counter i calculate a value and paint a div present in the page with its width set to the calulated value
6) then again the javascript sends another request
7) the cycle continues....until the entire Div gets painted

The servlet code :-
--------------------------------------------------------


--------------------------------------------------------


and the servlet mapping in web.xml is :-
--------------------------------------------------------

--------------------------------------------------------

and the .... html file is :-


--------------------------------------------------------

--------------------------------------------------------


PLEASE HELP ME! ... what is wrong in the code...as it is not working in IE 7 ? Million thanks in advance
 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can some one help me out ???
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PatienceIsAVirtue. It's the weekend; do you really expect answers within 86 minutes?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you debugged what is the world is happening?
Is the request making to the server? Is it cached?




Eric
 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I am sorry i was a bit impatient. The problem is fixed now! ... i don't know how ...but here is the story.

While i was waiting for some solution on ranch ...i went through following links which talk about "Stack overflow" problem of internet explorer.

http://www.eggheadcafe.com/software/aspnet/29732115/ie7-stack-overflow.aspx

http://answers.yahoo.com/question/index?qid=20070702025645AAs7P7Z

http://www.webdeveloper.com/forum/archive/index.php/t-33308.html

http://bytes.com/groups/javascript/622869-stack-overflow-ie-not-mozilla

... so i played with the settings or configuration of IE... i did not find any option like "Disable third party plugins" ... But i did find, options like:-
"Disable script debugging(Internet Explorer)" [...this was already ticked]
"Disable script debugging(Other)" [... this option was also ticked]
"Display notification for every script error [... and even this option was ticked]

so i unticked the 1st 2 options. In the meantime while i was searching the internet for some possible, i was also modifying the Ajax code, and considerable changes had been made by then.

TO MY SURPRISE.... the code worked !!! in all the three browsers :-
IE 7
Firefox 3.0.4
Google Chrome

.... i reverted back the settings of the browser to default and tried undoing the changes i made to the code as far as possible to reproduce the problem .....but to my surprise the error is not reproducible and still it is working in all the three browsers.

i really don't know what was the ACTUAL problem...and how it got solved.

Shall i post the latest AJAX code ... can someone please guide, what could have possibly went wrong ?

Million thanks!
 
Your mind is under my control .... your will is now mine .... read this tiny ad
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic