Display Message if GWT not supported

72 views
Skip to first unread message

rusty

unread,
Oct 8, 2006, 10:42:56 PM10/8/06
to Google Web Toolkit
Hi,

I've searched the forum, but can't find a way to do this. Is there a
way I can display a message to the user if their browser does not
support GWT. I assume it would have to be in the HTML page, because GWT
won't load, but do I manually have to check for unsupported browsers
myself?

cheers,

Russell

Eric B

unread,
Oct 9, 2006, 1:46:01 AM10/9/06
to Google Web Toolkit
Add this to your module html file:

<head>
...
<meta name="gwt:onPropertyErrorFn" content="unsupported" />
<script type="text/javascript">
<!--
// Called when GWT is not supported
function unsupported() {
// Do your thing here
}
//-->
</script>
...
</head>

Thanks,
Eric

rusty

unread,
Oct 9, 2006, 3:45:04 AM10/9/06
to Google Web Toolkit
Thanks, this looks like exactly what I was after :)

rusty

unread,
Oct 9, 2006, 8:59:17 PM10/9/06
to Google Web Toolkit
I can't get this to work. I've tried it in IE5 and IE5.5 with no luck.
Here's my code:
<meta name='gwt:onPropertyErrorFn' content='unsupported'>
<script type="text/javascript">

// Called when GWT is not supported
function unsupported() {
alert("test");
}
</script>

I've tried putting this right next to the meta declaration of my
module, and before and after the include of gwt.js - but no popup. Am I
missing something? I even tried moving it out of my JSP page and into a
simple HTML file, but still no luck.

Rusty

Eric B

unread,
Oct 9, 2006, 9:08:00 PM10/9/06
to Google Web Toolkit
Where does it say that IE5 and IE5.5 won't run a GWT app?

Thanks,
Eric

rusty

unread,
Oct 11, 2006, 12:23:23 AM10/11/06
to Google Web Toolkit
It doesn't say anywhere specific, I just know it doesn't because I
remember talking about it on the developer forums early on. Also the
kitchen sink example off their website doesn't even load in IE 5, so
that gives me a strong hint.

I ended up writing my own browser detection code because I couldn't get
the above to work. Thanks for you help all the same.

Rusty
p.s. My suspicion is that it doesn't work because IE 5 doesn't like the
gwt.js that you're trying to load. I'm fairly certain of this because
no matter what GWT app you try to run (kitchen sink off the Google
site, or your own, you get a script error on line 431 and no GWT loads)

Gabe

unread,
Oct 11, 2006, 1:00:58 AM10/11/06
to Google Web Toolkit
I have tried it too and ie 5x wouldnt do gwt.

It was great actually because it helped me convince the client to go to
firefox

so why is anyone still running ie 5 anyway ??

rusty

unread,
Oct 11, 2006, 1:19:00 AM10/11/06
to Google Web Toolkit
I love Firefox too. And I too wonder why some people still run IE5. But
we run stats programs on all our websites, and they do run it. Most of
them would be on old machines running Windows 2000, NT or pity the fool
98.

In the real world when you're making web sites for a company which in
turn has 1000's of clients, it's a bit much to be dictating to them
which browser they should be using. That's why in this case I've just
made a small part of the site in GWT, which the IE5 people won't be
able to use, while they can still use the rest of the site.

bruno.r...@gmail.com

unread,
Oct 11, 2006, 6:07:16 AM10/11/06
to Google Web Toolkit
you should also test if javascript is activate on your client.

Reply all
Reply to author
Forward
0 new messages