If you're using Wonder, you can access the ERXBrowser object that automatically gets hung onto your session on each request to do this, btw.

ms

On Apr 10, 2007, at 12:10 PM, Mr. Pierre Frisch wrote:

I am not sure I understand the problem but the browser does not change during a session so you can simply detect it in the headers and include whatever code you need in a WOConditional.

<webobject name="IEBrowser"><link rel="stylesheet" href="url_for_stylesheet.css" type="text/css" /></webobject>

IEBrowser: WOConditional {
        condition = IEBrowser;
}

Cheers

Pierre
--
Pierre Frisch
[EMAIL PROTECTED]


On 4-Apr-07, at 12:16 PM, David Masters wrote:

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/pierre% 40apple.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to