I have the same problem and I thought of using JSNI to fix it, but I
didn't try it until now.

You have to write a JSNI-Method, which defines a JavaScript-Method
that calls the Java-Code you want.
Something like that:

public native void initJavaScriptCall() /*-{
    $wnd.callJava = function() {
        [EMAIL PROTECTED]::functionToCall()();
    }
}-*/

public void functionToCall() {
     //TODO...
}

and then call the JavaScript-Function with the Hyperlink:

<a href="javascript:callJava();">Link</a>

Hope this works! Jakob


On Aug 27, 11:54 am, darkflame <[EMAIL PROTECTED]> wrote:
> Actualy, my original technique works, only not in hosted mode.
> odd.
>
> On Aug 27, 8:32 am, darkflame <[EMAIL PROTECTED]> wrote:
>
> > I have some HTML embeded in a basic HTML frame in my GWT app.
>
> > What Id like to do is use links in the frame to effect the GWT app.
> > I thought at first I could do this using the history state and
> > bookmarks.
> > Set up the HTML so the links are like;
>
> > <a href="#apple">apple</a>
>
> > And then use the "onHistoryChanged" in the app to detect the change
> > and return "apple".
>
> > Only the event dosnt seem to fire. I'm guessing because it isnt a real
> > history change, just adding the token onto the end of the url.
>
> > So does anyone have any ideas how to do this?
> > Preferable keeping the embeded html as simple as possible.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to