Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

newby:applet/refresh/works .. but only occasionally

  Asked By: Lucina    Date: Jul 08    Category: Java    Views: 831
  

I've go an applet which is hidden because it only contains data and a
couple of hashtables which get set up in the init method.
It has a function which returns a number based on a product and topic.

The problem occurs if I call something like:

document.write (
VApplet.getTopicCount ("Neuroscience", "Advisory Boards"))



If I keep pressing the refresh button sometimes the function is
called and the result displayed and sometimes I get an error, "Object
does not support this property or method".

I've tried putting <Body onload=init()> and calling the applets init
function from the init() method in javascript.

It seems to me that the applet has not initialised in time before it
is called.

If I put a button, say,
<input type=button onclick='alert(VApplet.getTopicCount
("Neuroscience","Advisory Boards") )'>

it works every time!

Can someone please tell me what I am doing wrong here!!

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on newby:applet/refresh/works .. but only occasionally Or get search suggestion and latest updates.