Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 10:28 PM
Harlan Messinger
Guest
 
Posts: n/a
Default 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.
  #2  
Old July 20th, 2005, 10:29 PM
Brian
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Harlan Messinger wrote:[color=blue]
> What kind of kludge will result in
>
> .ifIE { display: block; }
> .ifNotIE {display: none; }
>
> in IE and
>
> .ifIE { display: none; }
> .ifNotIE {display: block; }
>
> elsewhere?[/color]

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.

  #3  
Old July 20th, 2005, 10:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Brian <usenet2@julietremblay.com.invalid-remove-this-part> wrote:
[color=blue]
>Harlan Messinger wrote:[color=green]
>> What kind of kludge will result in
>>
>> .ifIE { display: block; }
>> .ifNotIE {display: none; }
>>
>> in IE and
>>
>> .ifIE { display: none; }
>> .ifNotIE {display: block; }
>>
>> elsewhere?[/color]
>
>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}[/color]

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.
  #4  
Old July 20th, 2005, 10:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Harlan Messinger <hmessinger.removethis@comcast.net> wrote:
[color=blue]
>Brian <usenet2@julietremblay.com.invalid-remove-this-part> wrote:
>[color=green]
>>Harlan Messinger wrote:[color=darkred]
>>> What kind of kludge will result in
>>>
>>> .ifIE { display: block; }
>>> .ifNotIE {display: none; }
>>>
>>> in IE and
>>>
>>> .ifIE { display: none; }
>>> .ifNotIE {display: block; }
>>>
>>> elsewhere?[/color]
>>
>>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}[/color]
>
>Thanks. Only good till IE 7, though, right? :-)[/color]

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.
  #5  
Old July 20th, 2005, 10:29 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Harlan Messinger wrote:
[color=blue]
> 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?
>[/color]

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

Use the parent-element and you are always save.


--
Anne van Kesteren
<http://www.annevankesteren.nl/>
  #6  
Old July 20th, 2005, 10:29 PM
Stephen Poley
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
<hmessinger.removethis@comcast.net> wrote:
[color=blue]
>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?[/color]

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/
  #7  
Old July 20th, 2005, 10:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those


"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:bv8hso$s1j$1@reader08.wxs.nl...[color=blue]
> Harlan Messinger wrote:
>[color=green]
> > 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?
> >[/color]
>
> Yes. There is. IE5.0 can give problems ;-)
>
> Use the parent-element and you are always save.[/color]

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

  #8  
Old July 20th, 2005, 10:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those


"Stephen Poley" <sbpoleySpicedHamTrap@xs4all.nl> wrote in message
news:7ate10tvclkj5lc0dp3j258hrruj4fr1a3@4ax.com...[color=blue]
> On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
> <hmessinger.removethis@comcast.net> wrote:
>[color=green]
> >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?[/color]
>
> 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.[/color]

Thanks, I'll take a look.

  #9  
Old July 20th, 2005, 10:30 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Harlan Messinger wrote:
[color=blue]
> Fortunately, this application is entirely within my
> control, and there are only about half a dozen users![/color]

Require them to upgrade to IE6 ;-)
[color=blue]
>
> 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:[/color]

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




--
Anne van Kesteren
<http://www.annevankesteren.nl/>
  #10  
Old July 20th, 2005, 10:31 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Anne van Kesteren <mail@annevankesteren.nl> wrote:
[color=blue]
>Harlan Messinger wrote:
>[color=green]
>> Fortunately, this application is entirely within my
>> control, and there are only about half a dozen users![/color]
>
>Require them to upgrade to IE6 ;-)
>[color=green]
>>
>> 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:[/color]
>
>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]

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.
  #11  
Old July 20th, 2005, 10:31 PM
Stephen Poley
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

On Thu, 29 Jan 2004 22:54:36 -0500, Harlan Messinger
<hmessinger.removethis@comcast.net> wrote:
[color=blue]
>Anne van Kesteren <mail@annevankesteren.nl> wrote:
>[color=green]
>>Harlan Messinger wrote:
>>[color=darkred]
>>> Fortunately, this application is entirely within my
>>> control, and there are only about half a dozen users![/color]
>>
>>Require them to upgrade to IE6 ;-)
>>[color=darkred]
>>>
>>> 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:[/color]
>>
>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
>
>Wow, that's really taking a chance, isn't it? Now, if I had an
>expendable machine ....[/color]

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/
  #12  
Old July 20th, 2005, 10:31 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Stephen Poley wrote:[color=blue][color=green][color=darkred]
>>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color][/color]
>
> It's been on my list of things to try for a few weeks. Has anyone else
> here tried it?
>[/color]

Works like a charm (XP).

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
  #13  
Old July 20th, 2005, 10:31 PM
Neal
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

On Fri, 30 Jan 2004 12:50:19 +0100, Stephen Poley
<sbpoleySpicedHamTrap@xs4all.nl> wrote:
[color=blue][color=green][color=darkred]
>>> Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
>>
>> Wow, that's really taking a chance, isn't it? Now, if I had an
>> expendable machine ....[/color]
>
> It's been on my list of things to try for a few weeks. Has anyone else
> here tried it?
>[/color]

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.
  #14  
Old July 20th, 2005, 10:31 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those


"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:bvdplf$8q1$1@reader11.wxs.nl...[color=blue]
> Stephen Poley wrote:[color=green][color=darkred]
> >>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
> >
> > It's been on my list of things to try for a few weeks. Has anyone else
> > here tried it?
> >[/color]
>
> Works like a charm (XP).[/color]

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?

  #15  
Old July 20th, 2005, 10:32 PM
Neal
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

On Fri, 30 Jan 2004 10:12:43 -0500, Harlan Messinger
<h.messinger@comcast.net> wrote:
[color=blue]
>
> "Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
> news:bvdplf$8q1$1@reader11.wxs.nl...[color=green]
>> Stephen Poley wrote:[color=darkred]
>> >>>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?
>> >[/color]
>>
>> Works like a charm (XP).[/color]
>
> 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?
>[/color]


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.
  #16  
Old July 20th, 2005, 10:32 PM
Brian
Guest
 
Posts: n/a
Default Re: IE 5.5, 6 only OR everything BUT those

Harlan Messinger wrote:[color=blue]
>
> 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[/color]

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/

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles