Re: Add Required Web Resource Gets Stuck in IF IE Tag
Re: Add Required Web Resource Gets Stuck in IF IE Tag
- Subject: Re: Add Required Web Resource Gets Stuck in IF IE Tag
- From: Amedeo Mantica <email@hidden>
- Date: Tue, 26 Jun 2012 00:48:11 +0200
A quick an dirty fix may be to add another script. An empty one. Call it void.js. Tomorrow I'll look for a better fix.
Amedeo
Sent from my iPhone
On 25/giu/2012, at 23:13, Johnny Miller <
email@hidden> wrote:
Hi,
I've made the two updates (using ERXIEConditionalComment and using the static method from ERXResponseRewriter instead of AjaxUtils - although AjaxUtils just calls ERXResponseRewriter so that's not really a change).
But I'm still having the same issue. Looking through ERXResponseRewriter there is the static method insertInResponseBeforeTag that is being called and which has a block of code like this:
if (content.toLowerCase().startsWith("<link") || content.toLowerCase().startsWith("<style")) {
int scriptIndex = responseContent.toLowerCase().indexOf("<script");
if (scriptIndex > 0 && scriptIndex < insertIndex) {
insertIndex = scriptIndex;
}
}
response.setContent(ERXStringUtilities.insertString(responseContent, content, insertIndex));
inserted = true;
So, because my first (and only script) in the head is inside the if IE conditional comment I believe that is why the stylesheet is being put in there.
Should I log a bug for this?
Thank you,
On Jun 23, 2012, at 11:16 AM, Amedeo Mantica wrote:
Remember to put erxresponserewriter after super too. I'm not sure will solve. But try
Sent from my iPhone
On 23/giu/2012, at 21:35, Johnny Miller <
email@hidden> wrote:
Hi Amedeo,
Ok. I'll try that.
re: why not use erxieconditionalcomment: just ignorance, now that I know about it I'll start using it. I should have realized that someone had created a simple solution for this already.
Thank you,
Johnny
Sent from my iPad
On Jun 23, 2012, at 7:08 AM, Amedeo Mantica <
email@hidden> wrote:
put ERXResponseRewriter after the super of appendToResponse
one more thing;... why u don't use ERXIEConditionalComment ?
Amedeo
On 22/giu/2012, at 02:18, Johnny Miller wrote:
Hi,
In my page wrapper's head section I have something like this:
// HTML
<head>
...
<webobject name = "IFLTIE9Open" />
<script src=""http://html5shim.googlecode.com/svn/trunk/html5.js">http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<webobject name = "IFIEClose" />
...
</head>
// WOD
IFIEClose : WOString {
escapeHTML = false;
value = "<![endif]-->";
}
IFLTIE9Open : WOString {
escapeHTML = false;
value = "<!--[if lt IE 9]>";
}
For some reason a stylesheet that gets added through addStylesheetResourceInHead function is stuffed in-between the IF IE tags.
Can someone please tell me how to fix this?
Thank you,
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