473,509 Members | 2,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

createElement applet and Opera 7


Ï need to dynamically insert an applet into a document. In IE 6.0 my code
works fine, but there seems to be problems in Opera 7. The page looks
like there is allocated space for an applet. Printing the size of the
document.applets array return as expected 0 before the insertion, and 1
after, in both Opera 7 and IE. However, the applet does not init properly
(no painting).

Anyone?

Regards Tormod Omholt-Jensen
------------------- C O D E -----------------

<script language="JavaScript1.2">

var applet = document.createElement("applet");
applet.code = "MyApplet.class";
applet.height = "50";
applet.width = "50";
applet.defer = true;

document.body.appendChild(applet);

</script>
Jul 20 '05 #1
1 4044
Hi,

Tormod Omholt-Jensen wrote:
Ï need to dynamically insert an applet into a document. In IE 6.0 my code
works fine, but there seems to be problems in Opera 7. The page looks
like there is allocated space for an applet. Printing the size of the
document.applets array return as expected 0 before the insertion, and 1
after, in both Opera 7 and IE. However, the applet does not init properly
(no painting).

Anyone?

Regards Tormod Omholt-Jensen
------------------- C O D E -----------------

<script language="JavaScript1.2">

var applet = document.createElement("applet");
applet.code = "MyApplet.class";
applet.height = "50";
applet.width = "50";
applet.defer = true;

document.body.appendChild(applet);

</script>


Wild guess here: To correctly start an applet, two methods are called
automatically by the browser: init() and start().

init() is called once only, when the applet is created.
start() is called every time that the applet is started, for example
when the page is reloaded.

These two methods can be overloaded by your own applet. I suspect that
they are called in IE but not in Opera. What you can do is overload
init() and start() so that a message is sent to the Java console when
they are executed. Like this you can check if they are called correctly.

HTH,

Laurent
--
Laurent Bugnion, GalaSoft
Webdesign, Java, javascript: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2449
by: WMMorgan | last post by:
There's a website I like to visit that has an user-interactive java application. There's a "visual applet" component and "control applet" component. (No, it's not an adult or porno site.) But...
3
2884
by: Jeff T. | last post by:
I have an applet that sizes itself to the size of the browser frame that it is running in. On IE the applet resizes upon dragging the frame divider. I'm having a problem with getting this...
25
5133
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to...
4
4265
by: sg_maat | last post by:
I have a little problem with createElement(and msie). I was experimenting a bit with createElement and made the following script: <script> var tmp = document.createElement("div");...
1
1725
by: admin | last post by:
Hi all, I wrote a small text editor (using a JTextPane) in order to ease the use of a CMS, in a more WYSIWYG way. Basically, you can see directly the effect of setting the background color, the...
1
2113
by: 418928 | last post by:
Hi everybody, I would like to know if the way of communicating with an applet from Javascript is standard (valid for all web browsers). I know that JSObject (Applet->javascript) is not...
1
2780
by: Reg | last post by:
I have a following code in HttpRequestListener's ProcessRequest method which is a Windows Console Application. I'm trying to read html page with browser (Opera) and html file contains tags to...
7
2512
by: Tarik Monem | last post by:
Why am I having so much trouble with using DOM in IE & Opera to create, then remove an Object & Embedded element? Here's the code that works in Firefox (Mac/Win/Linux) and Safari, but not on IE or...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.