By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,495 Members | 1,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,495 IT Pros & Developers. It's quick & easy.

typeof on applet method suddelny stopped working...

P: n/a
I have the following code fragment in one of my pages:

if (typeof document.getElementById('myApplet').getTableAsSDV != 'undefined')
{
rowBuffer = document.getElementById('myApplet').getTableAsSDV( );
}

The code above have been working in IE, NS anf Firefox for a long time now,
but have suddenly stopped working in IE 6, on WIN XP SP1.

It now returns 'undefined', so my rowbuffer never get set.

For the record:
typeof document.getElementById('myApplet') returns 'object',
so the applet is found.

It still work on other browsers, and in IE on Win2000 and lower...

Any insights on thisone?

TIA...

--
Dag.
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Dag Sunde wrote:
I have the following code fragment in one of my pages:

if (typeof document.getElementById('myApplet').getTableAsSDV != 'undefined')
{
rowBuffer = document.getElementById('myApplet').getTableAsSDV( );
}

The code above have been working in IE, NS anf Firefox for a long time now,
but have suddenly stopped working in IE 6, on WIN XP SP1.

It now returns 'undefined', so my rowbuffer never get set.

For the record:
typeof document.getElementById('myApplet') returns 'object',
so the applet is found.


If you have
<object id="myApplet" ...>
or
<applet id="myApplet" ...>
then of course
document.getElementById('myApplet')
finds that element object but whether the applet is run and exposes
public properties is a different issue.
Is Java enabled at all, have you checked the Java console whether there
are any problems with the applet itself being properly initialized and
started?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread2.arcor-online.net...


Dag Sunde wrote:
I have the following code fragment in one of my pages:

if (typeof document.getElementById('myApplet').getTableAsSDV != 'undefined') {
rowBuffer = document.getElementById('myApplet').getTableAsSDV( );
}

The code above have been working in IE, NS anf Firefox for a long time now, but have suddenly stopped working in IE 6, on WIN XP SP1.

It now returns 'undefined', so my rowbuffer never get set.

For the record:
typeof document.getElementById('myApplet') returns 'object',
so the applet is found.


If you have
<object id="myApplet" ...>
or
<applet id="myApplet" ...>
then of course
document.getElementById('myApplet')
finds that element object but whether the applet is run and exposes
public properties is a different issue.
Is Java enabled at all, have you checked the Java console whether there
are any problems with the applet itself being properly initialized and
started?


Yes to all of the above...
The applet is alive & kickin' when the problem occurs...
No problems in the console...
Java is definitely enabled (Sun plugin 1.4.2_06)

The above test was to check if my applet actually had a method called
"getTableAsSDV()" before calling it, but that suddenly stopped working
in IE/XP.

I've changed the code to:
if ( document.getElementById('myApplet') ) {
document.getElementById('myApplet').getTableAsSDV( );
}
instead, and all is well... (but it puzzles me...)

--
Dag.
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.