0

Bookmarking in IE 7/8

asked 2010-03-30 10:31:52 +0800

dastultz gravatar image dastultz
797 8

Hello,

I'm experimenting with setting Desktop bookmarks on a page that has a number of different states. Everything is working fine with Firefox and Safari, and everything works fine in IE until I leave the page and try to come back. Consider this sequence, all URL changes via mouse clicks:

home.html
myzkpage.zul
myzkpage.zul#one
myzkpage.zul#two
myzkpage.zul#three
someother.html

someother.html is accessed via clicking a button on myzkpage.zul#three and sending a redirect. Hitting the back button at the last page brings me to myzkpage.zul#three but the next click on back brings me to home.html! Again, only with IE.

Anyone seen this sort of thing?

Thanks.

/Daryl

delete flag offensive retag edit

6 Replies

Sort by » oldest newest

answered 2010-04-01 07:28:00 +0800

dastultz gravatar image dastultz
797 8

I was mistaken about the jump from myzkpage.zul#three to someother.html. I was using a Button but with href set. I changed it to Toolbatbutton with href for a more direct link but it still behaves the same way.

/Daryl

link publish delete flag offensive edit

answered 2010-04-01 08:01:29 +0800

dastultz gravatar image dastultz
797 8

After some Googling, I find that IE does not add history records for changes in hash. Does Zk not have any workaround for this?

/Daryl

link publish delete flag offensive edit

answered 2010-04-01 22:33:26 +0800

tmillsclare gravatar image tmillsclare
799 2 5 29

@dastultz,

Which ZK version are you using?

We do implement a workaround and have done since the first ZK version. Could you please try ZK demo with your browser to see if there is a similar issue?

In addition if you post your sample code I will take a look into what is happening.

link publish delete flag offensive edit

answered 2010-04-13 08:06:44 +0800

dastultz gravatar image dastultz
797 8

I'm using 3.6.3. Here's how to reproduce. Create three files:

bookmark_start.zul:

<window>
    <toolbarbutton label="Start" href="bookmark.zul" />
</window>

bookmark.zul:

<window id="wnd" title="Bookmark Demo" width="400px" border="normal">
    <zscript>
     page.addEventListener("onBookmarkChange",
         new EventListener() {
             public void onEvent(Event event) throws UiException {
                 try {
                     wnd.getFellow(wnd.desktop.bookmark).setSelected(true);
                 } catch (ComponentNotFoundException ex) {
                     tab1.setSelected(true);
                     wnd.desktop.bookmark = "";
                 }
             }
         });
	void setBookmark() {
		if (! tbox.selectedTab.id.equals("tab1")) desktop.bookmark = tbox.selectedTab.id;
		else desktop.bookmark = "";
	}
    </zscript>
 
    <tabbox id="tbox" width="100%" onSelect="setBookmark()">
        <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>
    After "start", click tab2, then tab 3, then click here: <toolbarbutton label="Leave page" href="bookmark_end.zul" />
    
</window>

bookmark_end.zul:

<window>
    Now click back button.
</window>

Start with "bookmark_start.zul". Click start, then tab2, then tab 3, then "leave page". Then click back button several times. In Safari, the back button takes you to tab3, then 2, then 1, then to "start". In IE (7 and probably 8), the back button goes to tab3, then directly to "start".

/Daryl

link publish delete flag offensive edit

answered 2010-04-13 08:24:42 +0800

dastultz gravatar image dastultz
797 8

Same behavior in 3.6.4.

/Daryl

link publish delete flag offensive edit

answered 2010-04-15 20:47:37 +0800

tmillsclare gravatar image tmillsclare
799 2 5 29

Hey Daryl, thanks for the excellent instructions on reproducing the bug. I have confirmed bug and written it up for you here.

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-03-30 10:31:52 +0800

Seen: 315 times

Last updated: Apr 15 '10

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