473,770 Members | 1,787 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.applet s 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="JavaS cript1.2">

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

document.body.a ppendChild(appl et);

</script>
Jul 20 '05 #1
1 4066
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.applet s 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="JavaS cript1.2">

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

document.body.a ppendChild(appl et);

</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
2464
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 the application isn't always usable because one or both of the applets have "failed," and has to be reset or something like that. I don't get it. How the hell does an applet "fail"? It's a set of instructions in code, right? It doesn't...
3
2895
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 applet to resize itself when I resize the html frame if it's in Netscape 7.x. Seems like the problem is the lack of a refresh signal to the java applet from the page. Is this a known bug, is there a workaround? Thanks. -Jeff
25
5197
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 calculate the totals in each row. when i try however, i receive the error: "Error: 'elements' is null or not an object"
4
4284
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"); tmp.setAttribute("name", "tmpdiv2"); tmp.setAttribute("id", "calendar"); var image = document.createElement("img"); image.setAttribute("src", "img/ok.gif");
1
1748
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 text color, bold/italic/underlined styles and so on... You can have several applet on one page as there is one applet per column and per language.
1
2137
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 compatible with some browsers, but I have not found any document indicating that the javascript- Also, I would like to know if there is any way to detect if a certain applet is running on a different JVM and obtain a reference to it (using Javascript).
1
2823
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 include Java Applet jar too, for (int i = 0; i < numRequestsToBeHandled; i++) { HttpListenerResponse response = null;
7
2526
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 Opera: var myfl_div = document.createElement('myfldiv'); myfl_div.setAttribute('style','position:absolute; left:100px; top:200px; width:960px; height: 560px; background-color: transparent;z-index: 5;'); function myFl_obj_emb() {
0
10257
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
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 we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.