• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing IE specific code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing IE specific code


  • Subject: Re: Writing IE specific code
  • From: Jean Pierre Malrieu <email@hidden>
  • Date: Wed, 4 Apr 2007 21:35:33 +0200

I did faced the vanishing ">" problem.
Thanks for your solution.

JPM

Le 4 avr. 07 à 21:16, David Masters a écrit :

Hi,

On 3 Apr 2007, at 22:08, Helmut Schottmüller wrote:

use -WOIncludeCommentsInResponse true with your application, The WO leaves the comments in the response.

Am 02.04.2007 um 17:55 schrieb Jean Pierre Malrieu:

I know it is not recommended, but I am trying (for the first time) to write specific code for IE (which has problems with Ajax).
I have tried to use comments in HTML ( <!--[if IE] etc.) but it does not seem to work fine. WebObjects seems to just eat them, and they don't event reach the client. Or is it because I am using direct connect in development mode?


If one does not rely on HTML comments, how does one write browser specific code?

Even when including comments in the response I ran into particular problems with the IE conditional comments because of the inclusion of the angle brackets that follow the conditional. One solution that I found was to put in a WOGenericElement in the <head> of the html of my page wrapper:


<webobject name="IEStyles"></webobject>

This was defined as:

IEStyles: WOGenericElement
{
elementName = "!--[if lt IE 7]><link rel=\"stylesheet\" href= \"url_for_stylesheet.css\" type=\"text/css\" /><![endif]--";
}


Essentially the elementName is whatever you'd normally put in to a static html file for an IE Conditional comment, minus the beginning and end angle-brackets (which get supplied by the WOGenericElement), and with the quotation marks escaped.

I suspect WOGenericElement was never intended to be (ab)used with such a bizarre elementName, but it did work quite nicely!

In case the formatting doesn't work properly here, I'd previously posted this hint at <http://www.pyrusmalus.com/blog/archives/ 2006/07/04/adding_ie_conditional_comments_in_wo.html>

David



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Writing IE specific code (From: Jean Pierre Malrieu <email@hidden>)
 >Re: Writing IE specific code (From: Helmut Schottmüller <email@hidden>)
 >Re: Writing IE specific code (From: David Masters <email@hidden>)

  • Prev by Date: Re: Writing IE specific code
  • Next by Date: Re: How to Retrieve Session User?
  • Previous by thread: Re: Writing IE specific code
  • Next by thread: Re: Writing IE specific code
  • Index(es):
    • Date
    • Thread