webtoolkit and IE7

15 views
Skip to first unread message

Stefan

unread,
May 20, 2006, 4:26:48 AM5/20/06
to Google Web Toolkit
Hello fellow coders.

I am new to this web toolkit, so I don't have that much experience.
Anyway I testet the Hello application in Internet Explore 7, and it
doesn't seem to work. Is there a compatibility issue with this
browser??

marco...@gmail.com

unread,
May 20, 2006, 7:32:52 AM5/20/06
to Google Web Toolkit
I wouldn't call it a compatibility issue. IE7 beta is not supported at
all (no script library will be loaded). You could try hacking it into
the nocache file, using the IE6 library might work.

Stefan

unread,
May 21, 2006, 6:38:09 AM5/21/06
to Google Web Toolkit
Thanks. IE sucks anyway ;-)

jack.tang

unread,
May 21, 2006, 6:54:36 AM5/21/06
to Google Web Toolkit
I have no ie7 in my hands. But i think maybe it is easy to hack this.

You can find UserAgent.gwt.xml in gwt-user.jar. Below is the content.
<!--
-->
<!-- Copyright 2006 Google Inc. All Rights Reserved.
-->
<!-- Defines the user.agent property and its provider function.
-->
<!--
-->
<!-- This module is typically inherited via com.google.gwt.user.User.
-->
<!--
-->
<module>

<!-- Browser-sensitive code should use the 'user.agent' property -->
<define-property name="user.agent"
values="ie6,moz,oldmoz,safari,opera"/>

<property-provider name="user.agent"><![CDATA[
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("opera") != -1) {
return "opera";
}
else if (ua.indexOf("safari") != -1) {
return "safari";
}
else if (ua.indexOf("msie 6.0") != -1) {
return "ie6";
}
else if (ua.indexOf("mozilla") != -1) {
var geckoIdx = ua.indexOf("gecko/");
if (geckoIdx == -1)
return "oldmoz";

var spaceIdx = ua.indexOf(" ", geckoIdx);
if (spaceIdx == -1)
spaceIdx = ua.length;

var version = parseInt(ua.substring(geckoIdx + 6, spaceIdx));
if (version < 20051107) // Firefox1.5's Gecko version
return "oldmoz";
return "moz";
}
return "unknown";
]]></property-provider>

</module>

try to change this line
else if (ua.indexOf("msie 6.0") != -1) {
to
else if(ua.indexOf("msie 6.0") != -1 || ua.indexOf("msie 7.0") !=
-1 )

Hope it helps

Sentience

unread,
May 23, 2006, 10:35:17 PM5/23/06
to Google Web Toolkit
This hack worked for me. I've got the KitchenSink sample running in
Hosted Mode with IE 7.

3rojka

unread,
May 25, 2006, 7:13:49 AM5/25/06
to Google Web Toolkit
Worked for me too thanks a million.

Reply all
Reply to author
Forward
0 new messages