• 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

How to make browser stop loading its contents until applet gets downloaded

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


How to make browser stop loading its contents until applet gets downoaded

I tried with document.all
so that all document elements will be loaded by the browser's document object , still unable to figure it out .

Thanks in advance
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a rather unusual thing to want to do. What is it you're trying to accomplish by doing this?
 
satyanarayana chivukula
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf Dittmer


In my jsp ,I have a functionality to call applet method which in turn return value that has to be passed to server is a hidden variable .
But this applet has to be downloaded from server.

sometimes may be due to network issues applet is not getting downloaded or not getting loaded into browser, so applet function calling throws javascript exception
element expected on calling

Thanks for suggestions
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what try/catch is for: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch
 
satyanarayana chivukula
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try{} catch{} serves to handle exceptions
but I have to call the applet method at any cost.

If I place applet method calling in try , exception would be caught.
but function has to be called , so javascript has to wait until applet gets loaded.


Thank you for suggestions
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand. If the JS calls a method that doesn't exist (like if the applet isn't yet called), some kind of exception would occur. And then you'd use try/catch to deal with that in whatever way is appropriate (maybe by setting a timeout before you try again). So I'm unclear what you mean by "but function has to be called" - you would be calling the function, but possibly not succeed at the first try, but rather at some later try. To me it sounds like that would solve your problem.
 
Squanch that. And squanch this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic