473,794 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using the object tag in IE

>From the book I am using as a reference I understood that applet tag
was deprecated, but googling for information, and testing myself, it
seems IE does not work properly with this new object tag. So my effort
reading about the object tag was for nothing? Is there no way I can
make this work for IE and Mozilla?

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="FFFFFF ">
<CENTER>
<object classid="java:A wtCalcApplet.cl ass"
archive="AwtCal c.jar"
type="applicati on/x-java-applet"
codebase="."
width = "220"
height = "150" >
I do not have any object that is why I display this text
</object>
</CENTER>
</BODY>
</HTML>

Dec 9 '05 #1
30 2513
After some investigation I made this, I guess this works ok.

<br/>
<br/>
<br/>
<form action="scan" method="POST">
<center>
<div Id='appie'></div>
</form>

<script>
var target = document.getEle mentById('appie ');
// alert(target);
var InternetExplore r = navigator.appNa me.indexOf("Mic rosoft") != -1;
// alert(InternetE xplorer);
if (InternetExplor er != true)
{
// alert('mozilla' );
target.innerHTM L = "<object classid='java:A wtCalcApplet.cl ass'
archive='/AwtCalc.jar' type='applicati on/x-java-applet' codebase='/'
width='220' height='150'> I do not have any object that is why I
display this text </object>";
}
else
{
// alert('internet explorer');
target.innerHTM L = "<applet code = 'AwtCalcApplet. class' archive
= '/AwtCalc.jar' width = '220' height = '150'> </applet>";
};
</script>

Dec 9 '05 #2
On 09/12/2005 10:12, marc wrote:
From the book I am using as a reference I understood that applet tag
was deprecated,
Correct. It has been for a long time.
but googling for information, and testing myself, it seems IE does
not work properly with this new object tag.
It does, but not so readily as other browsers.
So my effort reading about the object tag was for nothing?
Not at all.
Is there no way I can make this work for IE and Mozilla?
Yes. See
<http://groups.google.c o.uk/group/alt.html/browse_frm/thread/1a71a3fd69503de 8/d4b02174e1cf3f1 6#d4b02174e1cf3 f16>

[snip]
<BODY BGCOLOR="FFFFFF ">
<CENTER>


The bgcolor attribute and CENTER element are also deprecated. Use CSS,
instead.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Dec 9 '05 #3
marc wrote:
After some investigation I made this, I guess this works ok.

<br/>
<br/>
<br/>
<form action="scan" method="POST">
<center>
<div Id='appie'></div>
</form>
<shudder/> I guess not. <URL:http://validator.w3.or g/>
[nonsensical invalid code snipped]

PointedEars
Dec 9 '05 #4
Euh yeah well, what can I say, at least I have bookmarked the url that
will point me to the validator from now on...

Dec 9 '05 #5
marc wrote:
Euh yeah well, what can I say, at least I have bookmarked the url that
will point me to the validator from now on...


That is a start. You could continue with switching to HTML 4.01 Strict
that IE supports (in contrast to XHTML) and to the not-at-all-deprecated
`applet' element, correcting the invalid code, stop using the nonsensical
browser switch

<URL:http://pointedears.de/scripts/test/whatami>

and quoting the minimum of what you are replying to on Usenet (in
Google Groups: "Options", "Reply") as described in the newsgroup's FAQ

<URL:http://jibbering.com/faq/>

which also points out that with Java applets, unless scripted with
client-side J(ava)Script/ECMAScript, you are completely off-topic
here since

Java != JavaScript
HTH & HAND

PointedEars
Dec 9 '05 #6
On 09/12/2005 16:17, Thomas 'PointedEars' Lahn wrote:
[...] You could continue with [...] the not-at-all-deprecated
`applet' element [...]


The APPLET element /is/ deprecated.

APPLET is deprecated (with all its attributes) in favor of
OBJECT.
-- 13.4 Including an applet: the APPLET element, HTML 4.01

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Dec 9 '05 #7
> which also points out that with Java applets, unless scripted with
client-side J(ava)Script/ECMAScript, you are completely off-topic
here since
Java != JavaScript


Yeah, ok, but I am actually wondering if I should the object tag or the
applet tag to call the applet from html and javascript. (The applet I
am using is just an example from internet.)

Dec 9 '05 #8
Michael Winter wrote:
On 09/12/2005 16:17, Thomas 'PointedEars' Lahn wrote:
[...] You could continue with [...] the not-at-all-deprecated
`applet' element [...]


The APPLET element /is/ deprecated.

APPLET is deprecated (with all its attributes) in favor of
OBJECT.
-- 13.4 Including an applet: the APPLET element, HTML 4.01


Indeed, my bad. So he needs to declare HTML 4.01 Transitional, not Strict.
Still better than using "browser detection" to serve either the `object' or
the `applet' element in XHTML 1.0 (Transitional/Strict) or even XHTML 1.1+.
PointedEars
Dec 9 '05 #9
marc wrote:

Please provide attribution of quoted material.
vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv v
which also points out that with Java applets, unless scripted with
client-side J(ava)Script/ECMAScript, you are completely off-topic
here since
Java != JavaScript


Yeah, ok, but I am actually wondering if I should the object tag or the
applet tag to call the applet from html and javascript. (The applet I
am using is just an example from internet.)


Declare HTML 4.01 Transitional and use the `applet' element, Sun says the
Java plugin supports that element. I am not a Java developer, though, so
RTFM (and note that it includes deprecated and even nonsensical examples
as well).

<URL:http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/contents.html>
PointedEars
Dec 9 '05 #10

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

Similar topics

4
2072
by: Michael Sparks | last post by:
Anyway... At Europython Guido discussed with everyone the outstanding issue with decorators and there was a clear majority in favour of having them, which was good. From where I was sitting it looked like about 20:20 split on the following syntaxes: 1 def func(arg1, arg2, arg3) : function... 2 def func(arg1, arg2, arg3): function...
0
6706
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
28
20347
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()', this.pinginterval); - but is there no way to do this without using the literal ObjectName? If I write 'this.methodName()' I get "Line 1 Char 1: Object doesn't support this property or method." in IE, and nothing happens in Firebird.
11
2206
by: Doug | last post by:
Is there any harm in passing an object into a method with the 'ref' keyword if the object is already a reference variable? If not, is there any benefit?
17
4229
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset Set rs = Me.RecordsetClone rs.Find "=" & lngContractID If Not rs.EOF Then Me.Bookmark = rs.Bookmark I must site the Heisenberb Uncertainty Principal here, as it
9
10906
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent the wheel, right? Everything so far is working well with the Active Directory. The problem I am having is with adding File Permissions to a directory. I am currently using some code courtesy of "Willy Denoyette "
4
3404
by: Chris | last post by:
Hi, everything works apart from the last line :-(( rng.Value2.ToString() An exception is thrown : "Old format or invalid type library" It gets compiled though (so he recognizes the property 'Value2'). So I suppose I'm using a incompatible type lib. I'm using Excel 2002 : Excel 10.0 Object Library
0
6438
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
14
3169
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects it makes difference to explicitly put them to null after working with them is done - it somehow makes the GC collect them sooner, like here: void SomeFunc() { MyClass c = new MyClass();
2
3501
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console application, and also succeeds from the asp.net page with BodyFormat=MailFormat.Text. I've recently upgraded from W2K SP4 to WinXP SP2 and am using .Net Framework v1.1 SP1. The code worked fine under W2K SP4.
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10433
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
10212
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
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...
1
7538
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
6777
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
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.