473,503 Members | 5,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get rid of scrolbars around an object?

Hi all,

can anybody help with this HTML4 problem, please:

<OBJECT type="image/jpeg" data="Sample.jpg" width=300

height=300>

shows

a) the image Sample.jpg in its original size, irrespective of

values for "width" and "height"

b) horizontal and vertical scrolbars around the image or part

of the image, respectively, depending on the relation of

image size to "width" and "height"

Problem

*******

a) how can I scale the image according to "width" and

"height"?

b) how can I get rid of the scrolbar frame?

Or is this impossilbe with <OBJECT> and will I have to stick

to <IMG>?

My systems: PC Win2000 SP4 IE 6.0 and WinXP Home SP2 IE 6.0

Thanks, Siggi

P.S. Don't sugest <IMG src="Sample.jpg" width="300"

height="300">!

This works fine, but I've read one could do everything with

<OBJECT> one could do with <IMG>
Mar 3 '06 #1
7 5955
"Michael Ulrich" <sm***********@yahoo.com> wrote:
Hi all,

can anybody help with this HTML4 problem, please:
Please loose the extra blank lines in future posts, corrected this
once.
<OBJECT type="image/jpeg" data="Sample.jpg" width=300 height=300>
<object> is not empty, it needs a closing tag.
shows

a) the image Sample.jpg in its original size, irrespective of
values for "width" and "height"
Only in IE, IE doesn't really support image embedding via the object
element.
b) horizontal and vertical scrolbars around the image or part
of the image, respectively, depending on the relation of
image size to "width" and "height"
Only in IE, IE doesn't really support image embedding via the object
element.
Or is this impossilbe with <OBJECT> and will I have to stick
to <IMG>?


If you want to support IE, yes.

--
Spartanicus
Mar 3 '06 #2

"Spartanicus" <in*****@invalid.invalid> schrieb im Newsbeitrag
news:tp********************************@news.spart anicus.utvinternet.ie...
[snip]
a) the image Sample.jpg in its original size, irrespective of
values for "width" and "height"


Only in IE, IE doesn't really support image embedding via the object
element.

[snip]

Thanks! With Netscape no problem: no scrolbars, and image sizeable!

Siggi
Mar 4 '06 #3
On Sat, 4 Mar 2006, Siggi wrote:
"Spartanicus" <in*****@invalid.invalid> schrieb im Newsbeitrag
a) the image Sample.jpg in its original size, irrespective of
values for "width" and "height"


Only in IE, IE doesn't really support image embedding via the
object element.


Thanks! With Netscape no problem: no scrolbars, and image sizeable!


Despite what had seemed to me to be "obvious" theoretical advantages
of <object> over <img>, I concluded some years back that the browser
developers (at that time it was between Netscape 4 and IE-something)
had so royally screwed-up the implementation of <object> as to make it
unusable in practice...

I'm afraid I hadn't re-examined the situation since; however, <object>
provides a fallback, intended for browsers which don't support it, and
that fallback could be an <img>. And the <img> in its turn can
provide a text fallback.

<object ...>
<img ... alt="alternative text">
</object>

OK, so that isn't ideal as a way of providing a text fallback, since
one of the motives of <object> was to permit a fully marked-up piece
of textual content as its fallback, whereas here we've had to accept
one of the very limitations for which <img> was supposed to be
phased-out, namely the fact that its textual alternative has to be an
*attribute value*, not a piece of marked-up content. But let's follow
the idea a little way, nevertheless.

Maybe there's a way of coding <object>, with <img> as its fallback, in
such a way that web-compatible browsers behave correctly, while MSIE
renders the <img> instead?

If it's only MSIE that needs to be shielded from the <object>
nowadays, then surely MSIE's "conditional comments" can be used, to
hide the object markup from MSIE and leave it seeing only the <img> ?

A web search suggests
http://diveintomark.org/archives/200...ernet_explorer
(but as you see, this was from 2003).

It also suggests
http://www.w3.org/TR/2004/WD-WCAG20-...ortdescription
and the immediately following items, which are rather depressing:

"User agent problems make this technique ineffective at this time."

And, on the other hand, unless one is using some kind of custom
processor for generating the (x)HTML, there's the question whether
this is really worth all the effort, seeing that (even as WCAG2
admits), rather few of the potential benefits of <object> can be
realised in a compatible fashion? If you want zoomable images, most
of the graphical browsers browsers I tried nowadays support <img>
sized via CSS in em units, even if their zooming algorithms don't
produce top quality results.

Just some thoughts, anyway. Further study needed?
Mar 4 '06 #4
On Sat, 4 Mar 2006, Alan J. Flavell wrote:
If it's only MSIE that needs to be shielded from the <object>
nowadays, then surely MSIE's "conditional comments" can be used, to
hide the object markup from MSIE and leave it seeing only the <img> ?


OK, I've had a little play around, and here's a couple of sketches
of how it could be done:

http://ppewww.ph.gla.ac.uk/~flavell/tests/obj.html

Whether it's worth the bother is something else, of course. I don't
really have any plans to deploy it myself in this form, I must admit.

But this happily displays the JPEG object (or its marked-up fallback
text) as designed, on Mozilla (and firefox, of course), Opera 8.5,
Lynx, Konqueror, Elinks, to name the browsers which I tried(*).

Only MSIE gets the <img...> instead.

(*) But why not in Amaya? I tried 9.4 Win32. It displayed neither
the JPEG image nor the fallback text. Even though in its structure
view it was quite clear that it was seeing the <object> and parsing
the comments just as it was supposed to.
Mar 5 '06 #5
"Alan J. Flavell" <fl*****@physics.gla.ac.uk> schrieb im Newsbeitrag news:Pi*******************************@ppepc70.ph. gla.ac.uk...
On Sat, 4 Mar 2006, Alan J. Flavell wrote:
If it's only MSIE that needs to be shielded from the <object>
nowadays, then surely MSIE's "conditional comments" can be used, to
hide the object markup from MSIE and leave it seeing only the <img> ?


OK, I've had a little play around, and here's a couple of sketches
of how it could be done:

[snip]

Thank you, Alan, for the examples you worked out!
This is excellent read for a newbie like me. I
also liked your references to Object Paranoia and
About Conditional Comments, tricks I never heared of
before.

Siggi

P.S.:
To be honest, I taught myself some HTML only to get
a private multimedia presentation working on CD.
I did not want to use Powerpoint, but something more
universal, a browser. The presentation is simple, just
a JPEG images and MPEG movies with commenting text.
For the images I used <IMG>, for the movies <EMBED>.
I did not even specify "video/mpeg" or something
like that. This works fine on my WinXP home PC, both
with MSIE and Netscape (Quicktime opens but not MSplayer
to play the movies!?); on a different Win2000 PC the
images were fine, but the movies did not like Firefox
as default browser (remedy: setting IE as default);
on a MAC, the images were fine, but the movies will
not work when called up within my HTML code, however
when loaded into this MAC's MSplayer or Quicktime,
the movies are fine.
So, I thought why not use <OBJECT> to embed both
images and movies; and I started with <OBJECT>ed
images to learn what it is all about this tag.

Mar 9 '06 #6
On Thu, 9 Mar 2006, Michael Ulrich wrote:
"Alan J. Flavell" <fl*****@physics.gla.ac.uk> schrieb im Newsbeitrag news:Pi*******************************@ppepc70.ph. gla.ac.uk...
uh-uh, ich kann auch deutsch... macht nix...
On Sat, 4 Mar 2006, Alan J. Flavell wrote:
If it's only MSIE that needs to be shielded from the <object>
nowadays, then surely MSIE's "conditional comments" can be used, to
hide the object markup from MSIE and leave it seeing only the <img> ?


OK, I've had a little play around, and here's a couple of sketches
of how it could be done:

[snip]

Thank you, Alan, for the examples you worked out!


Please be clear that this was only a sketch, as a basis for possible
further discussion, and not intended - at least not without careful
consideration - for deployment in a production situation.
also liked your references to Object Paranoia ...
You'll notice that we came up with slightly different syntax to fool
MSIE while satisfying HTML validation. I can't guarantee that either
of them is better...
About Conditional Comments, tricks I never heared of before.
Sometimes, if one stands on one's head and follows the advice of the
Caterpillar in Alice, it's possible to get something useful out of MS
documentation.
To be honest, I taught myself some HTML only to get
a private multimedia presentation working on CD.


On this group, however, the regulars take it for granted that the
topic is WWW, not some private/intranet/CD/DVD requirement. Other
matters than the WWW are technically off-topic - as the name of the
newsgroup indicates - but, in my experience, even those who think
their problem is delimited by some locked-down intranet can learn
useful ideas from the WWW (and thereby defend themselves from the
inevitable legal action for anti-disability behaviour towards
employees and potential employees... - but I digress).

Gruesse

Mar 9 '06 #7

"Alan J. Flavell" <fl*****@physics.gla.ac.uk> schrieb im Newsbeitrag news:Pine.WNT.4.64.0603092013590.1732@ZORIN...
On Thu, 9 Mar 2006, Michael Ulrich wrote:
"Alan J. Flavell" <fl*****@physics.gla.ac.uk> schrieb im Newsbeitrag
news:Pi*******************************@ppepc70.ph. gla.ac.uk...
uh-uh, ich kann auch deutsch... macht nix...
[snip]
uh-uh, ich kann auch deutsch... macht nix...
toll, der Name klingt ja nicht sehr deutsch. Ich schreibe aber
der Hoeflichkeit der Gruppe gegenueber lieber auf Englisch.
On this group, however, the regulars take it for granted that the
topic is WWW, not some private/intranet/CD/DVD requirement. Other
matters than the WWW are technically off-topic - as the name of the
newsgroup indicates - but, in my experience, even those who think
their problem is delimited by some locked-down intranet can learn
useful ideas from the WWW (and thereby defend themselves from the
inevitable legal action for anti-disability behaviour towards
employees and potential employees... - but I digress).
What's wrong with learning WWWese, HTML to be specific, privately
before putting up my own homepage? This avoids many mistakes
in my writing an efficient code. Is there a newsgroup specializing
in HTML? I found this group when searching for "HTML". Was it a
wrong hit?

Gruesse


Auch viele Gruesse und vielen Dank fuer die bisherige ausfuehrliche
Hilfe,

Siggi
Mar 10 '06 #8

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

Similar topics

0
935
by: Blazej Czeladzki \(ByCZy\) | last post by:
Can anybody help me with syncronisation of scrolbars in two instances of richTextBox? -- _____________ Pozdrawiam: Blazej Czeladzki
4
12302
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text...
1
1394
by: tiffini | last post by:
Hi, I have an interesting question about an object pointer. If you have Class A <---- Class B <--- Class C <- Class D / /
5
1033
by: robin9876 | last post by:
After an object is declared, how long will that object be available until it time's out?
3
14474
by: vijay.gandhi | last post by:
Hi, I am trying to convert some unmanaged code (C++) to managed code (using C++/CLI). 1) One of the functions used returns a void* which I need to cast into a handle of a managed object. Can...
0
2197
by: =?Utf-8?B?SkhhbGV5?= | last post by:
Our system is: IIS Server: dual Intel Xeon 2.80 GHz, 4 GB Ram Windows Server 2003 SP2 IIS 6.0 SQL Server: dual Intel Xeon 2.80 GHz, 4 GB Ram (separate server) Windows Server 2003 SP2 SQL...
9
1359
by: Andy B | last post by:
I need to decide on how to store online signed contracts for customers and clients. I have considered a database in sql server 2005, but it seems to be too complicated. Besides, if the contract...
275
12035
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
23
3114
by: tonytech08 | last post by:
What I like about the C++ object model: that the data portion of the class IS the object (dereferencing an object gets you the data of a POD object). What I don't like about the C++ object...
0
7316
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
6976
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
7449
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
5566
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,...
1
4993
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...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
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 ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
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.