0

onBookmarkChange in various Browsers

asked 2010-08-30 02:28:19 +0800

mw88 gravatar image mw88
93 2
http://www.mw88.org

Hello,

I'm testing the bookmarks feature and it seems that the behaviour is quite different in some browsers.

I added the EventListener with the "ON_BOOKMARK_CHANGE" event to my main window which calls the class onBookmarkChange.
This class handles the event and calls the gui masks given in the bookmark.

The only problem is that it seems that the bookmark events are handled differently in some browsers.

For example:
In Firefox I can't use the forward and back buttons, the drop-down list works
In IE 6 I can't use the forward button but the back buttons work
In Safari the forward and back buttons work
In Google Chrome the back button works but the forward button doesn't

Is this a known problem or maby just a configuration problem?

Thanks in advance

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-09-01 03:38:43 +0800

SimonPai gravatar image SimonPai
1696 1

Hi mw88,

I tested an example from this guide, and it works with FireFox, Chrome and IE6.
My ZK version is 5.0.4 EE.

My test case is the following:

<window id="wnd" title="Bookmark Demo" width="400px" border="normal">
    <zscript>
     page.addEventListener("onBookmarkChange",
         new org.zkoss.zk.ui.event.EventListener() {
             public void onEvent(Event event) throws UiException {
                 try {
                     wnd.getFellow(wnd.desktop.bookmark).setSelected(true);
                 } catch (ComponentNotFoundException ex) {
                     tab1.setSelected(true);
                 }
             }
         });
    </zscript>
 
    <tabbox id="tbox" width="100%" onSelect="desktop.bookmark = self.selectedTab.id">
        <tabs>
            <tab id="tab1" label="Tab 1"/>
            <tab id="tab2" label="Tab 2"/>
            <tab id="tab3" label="Tab 3"/>
        </tabs>
        <tabpanels>
            <tabpanel>This is panel 1</tabpanel>
            <tabpanel>This is panel 2</tabpanel>
            <tabpanel>This is panel 3</tabpanel>
        </tabpanels>
    </tabbox>
</window>

Hope this can help to solve your issue.

Regards,
Simon

link publish delete flag offensive edit

answered 2010-09-01 04:54:33 +0800

mw88 gravatar image mw88
93 2
http://www.mw88.org

Hi Simoni,

I just noticed that with ZK 5.0.4 this seems to work with all my Browsers.
Thank you for your help.

Regards,
Martin

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-08-30 02:28:19 +0800

Seen: 407 times

Last updated: Sep 01 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More