473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

IE 5.5, 6 only OR everything BUT those

I've got a form used to enter items to be listed in a web-based
catalog. In the past, I've instructed the users to enter I and B tags
(this goes back a while) into the textareas to get italics and bold
face in the catalog.

Now I've created a version of the page for IE that uses the
proprietary contentEditable="true" attribute on a div , which enables
the user to enter text into the div and use Ctrl-I and Ctrl-B to
produce italics and boldfacing. (It permits other formatting too, but
I'm only interested in these two effects.) I'm using display: none on
the textarea. The div has an onblur that transfers its current
contents to the textarea.

I would like to use this single page on all browsers. On IE, I'd like
the div to appear and the textarea to be hidden, and vice versa on
other browsers. Suppose I assign the textarea to a class called "ifIE"
and the div to a class called "ifNotIE". What kind of kludge will
result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #1
15 2457
Harlan Messinger wrote:
What kind of kludge will result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?


I'm not commenting on whether the idea is sound. But to hide css from
IE, use the child selector.

..ifIE { display: block }
..ifNotIE { display: none }

body>div.ifIE { display: none }
body>div.ifNotIE { display: block}

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Seen on the web:
This page best viewed by coming over to my office and looking at it on
my monitor.

Jul 20 '05 #2
Brian <us*****@julietremblay.com.invalid-remove-this-part> wrote:
Harlan Messinger wrote:
What kind of kludge will result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?


I'm not commenting on whether the idea is sound. But to hide css from
IE, use the child selector.

.ifIE { display: block }
.ifNotIE { display: none }

body>div.ifIE { display: none }
body>div.ifNotIE { display: block}


Thanks. Only good till IE 7, though, right? :-)

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #3
Harlan Messinger <hm*******************@comcast.net> wrote:
Brian <us*****@julietremblay.com.invalid-remove-this-part> wrote:
Harlan Messinger wrote:
What kind of kludge will result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?


I'm not commenting on whether the idea is sound. But to hide css from
IE, use the child selector.

.ifIE { display: block }
.ifNotIE { display: none }

body>div.ifIE { display: none }
body>div.ifNotIE { display: block}


Thanks. Only good till IE 7, though, right? :-)


Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
"body", though, since the items aren't at the top level. There isn't
any problem with that, is there?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #4
Harlan Messinger wrote:
Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
"body", though, since the items aren't at the top level. There isn't
any problem with that, is there?


Yes. There is. IE5.0 can give problems ;-)

Use the parent-element and you are always save.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #5
On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
<hm*******************@comcast.net> wrote:
I would like to use this single page on all browsers. On IE, I'd like
the div to appear and the textarea to be hidden, and vice versa on
other browsers. Suppose I assign the textarea to a class called "ifIE"
and the div to a class called "ifNotIE". What kind of kludge will
result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?


Never used them myself, but there's a beast called IE conditional
comments which should help. Googling c.i.w.a.* should produce the
syntax.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #6

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bv**********@reader08.wxs.nl...
Harlan Messinger wrote:
Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
"body", though, since the items aren't at the top level. There isn't
any problem with that, is there?


Yes. There is. IE5.0 can give problems ;-)

Use the parent-element and you are always save.


Thanks for the advice. If it turns out to be necessary, I can make the
selectors more specific. Fortunately, this application is entirely within my
control, and there are only about half a dozen users! I've already told them
"it may work in IE 5.5, probably won't work in IE 5, and definitely won't
work in IE older than that". If that really causes anyone a problem, then I
can adjust the selectors.

As a compromise that would retain some generality (that is, not require me
to check what the parent element is in each case), would this work:

body>* div.isIE

? I think this would then ignore elements that *are* directly children of
the body, but I'm not applying this technique to any of them. If I were then
I could add have both selectors:

body>div.isIE
body>* div.isIE

Jul 20 '05 #7

"Stephen Poley" <sb******************@xs4all.nl> wrote in message
news:7a********************************@4ax.com...
On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
<hm*******************@comcast.net> wrote:
I would like to use this single page on all browsers. On IE, I'd like
the div to appear and the textarea to be hidden, and vice versa on
other browsers. Suppose I assign the textarea to a class called "ifIE"
and the div to a class called "ifNotIE". What kind of kludge will
result in

.ifIE { display: block; }
.ifNotIE {display: none; }

in IE and

.ifIE { display: none; }
.ifNotIE {display: block; }

elsewhere?


Never used them myself, but there's a beast called IE conditional
comments which should help. Googling c.i.w.a.* should produce the
syntax.


Thanks, I'll take a look.

Jul 20 '05 #8
Harlan Messinger wrote:
Fortunately, this application is entirely within my
control, and there are only about half a dozen users!
Require them to upgrade to IE6 ;-)

As a compromise that would retain some generality (that is, not require me
to check what the parent element is in each case), would this work:


Check for yourself: <http://www.skyzyx.com/archives/000094.php>


--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #9
Anne van Kesteren <ma**@annevankesteren.nl> wrote:
Harlan Messinger wrote:
Fortunately, this application is entirely within my
control, and there are only about half a dozen users!


Require them to upgrade to IE6 ;-)

As a compromise that would retain some generality (that is, not require me
to check what the parent element is in each case), would this work:


Check for yourself: <http://www.skyzyx.com/archives/000094.php>


Wow, that's really taking a chance, isn't it? Now, if I had an
expendable machine ....

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #10
On Thu, 29 Jan 2004 22:54:36 -0500, Harlan Messinger
<hm*******************@comcast.net> wrote:
Anne van Kesteren <ma**@annevankesteren.nl> wrote:
Harlan Messinger wrote:
Fortunately, this application is entirely within my
control, and there are only about half a dozen users!


Require them to upgrade to IE6 ;-)

As a compromise that would retain some generality (that is, not require me
to check what the parent element is in each case), would this work:


Check for yourself: <http://www.skyzyx.com/archives/000094.php>


Wow, that's really taking a chance, isn't it? Now, if I had an
expendable machine ....


It's been on my list of things to try for a few weeks. Has anyone else
here tried it?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #11
Stephen Poley wrote:
Check for yourself: <http://www.skyzyx.com/archives/000094.php>


It's been on my list of things to try for a few weeks. Has anyone else
here tried it?


Works like a charm (XP).

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #12
On Fri, 30 Jan 2004 12:50:19 +0100, Stephen Poley
<sb******************@xs4all.nl> wrote:
Check for yourself: <http://www.skyzyx.com/archives/000094.php>


Wow, that's really taking a chance, isn't it? Now, if I had an
expendable machine ....


It's been on my list of things to try for a few weeks. Has anyone else
here tried it?


I can have all 3 running simultaneously on W97. The only drawback is they
all 'appear' to be IE6 but the behavior is appropriate to the actual
versions they are. So you need to keep track of which one is which when
you have more than one version open.
Jul 20 '05 #13

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bv**********@reader11.wxs.nl...
Stephen Poley wrote:
Check for yourself: <http://www.skyzyx.com/archives/000094.php>


It's been on my list of things to try for a few weeks. Has anyone else
here tried it?


Works like a charm (XP).


Besides safety, I'm concerned about reliability. Are you certain that the
behavior you're seeing in each "version" is identical to the behavior that
that version exhibits when installed by itself?

Jul 20 '05 #14
On Fri, 30 Jan 2004 10:12:43 -0500, Harlan Messinger
<h.*********@comcast.net> wrote:

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bv**********@reader11.wxs.nl...
Stephen Poley wrote:
>>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>
>
> It's been on my list of things to try for a few weeks. Has anyone else
> here tried it?
>


Works like a charm (XP).


Besides safety, I'm concerned about reliability. Are you certain that the
behavior you're seeing in each "version" is identical to the behavior
that
that version exhibits when installed by itself?

This is more technical than I can explain adequately, but the only parts
removed from the installation are things which prevent side-by-side
installation. The only real issue I know of is that I'm told attempting to
access Favorites will crash it.
Jul 20 '05 #15
Harlan Messinger wrote:

As a compromise that would retain some generality (that is, not
require me to check what the parent element is in each case), would
this work:

body>* div.isIE


I don't know, but this would:

html>body .isIE
html>body .isNotIE

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #16

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

Similar topics

20
by: xeys_00 | last post by:
I posted a article earlier pertaining programming for my boss. Now I am gonna ask a question about programming for myself. I just finished my first C++ Class. Next semester is a class on...
1
by: gipsy boy | last post by:
Sorry I had no idea how to name my subject. Is this good practise? : Suppose I have a situation that's a bit like a relational database. I have a list of objects A, a list of objects B, and I...
16
by: jcf | last post by:
I need to do the following: Our application builds information from a string that is stored in a buffer that can be any of the following formats: ABCD0102, ABCDEF0102, AB*CD*01*02, AB*CDEF*01*02....
13
by: Benny | last post by:
Hi, I have something like this: try { // some code } catch // note - i am catching everything now {
8
by: Andy Capon | last post by:
Hi There, We have a medium size project about 2000 source files and 700,000 lines of code, as you can imagine this takes some time to rebuild all. Now our problem is that we have a code...
5
by: Brett | last post by:
In VB .NET everything is supposed to be an object. Say I have a report title hard coded in a method. When a method is called, is the returned title an object or a string? Thanks, Brett
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
3
by: vijaykokate | last post by:
Our company http://www.softnmation.com/ offers its customers a great variety of products. Everything you need can be found in this site. Web Template, CSS Template, Logo Template, Corporate...
1
by: mavis | last post by:
Firstly, is it possible to locate everything in xsd by XPATH? for example, xs:element/xs:complexType/xs:sequence/xs:element ..... Is there any good ways to record the XPath info through...
5
by: Martin Drautzburg | last post by:
Hello all, I've seen various attempts to add distributed computing capabilities on top of an existing language. For a true distributed system I would expect it to be possible to instantiate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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
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...
0
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
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,...

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.