views:

29

answers:

1

I have a sidebar (iframe). The problem is, if you open a second tab (in the same browser) it creates a new instance of the same sidebar. That means i have now 2 sidebars. In exemple, if i close the sidebar in the first tab, i would like to have it closed in the second tab as well. Is it possible to have only one instance of a sidebar in a browser, so that even if i open a new tab, the sidebar is not affected. (the goal is to interact with evey pages we visit with one sidebar. If anyone needs more precise information, please ask. I'll be checking for responses every single day.

+1  A: 

You can't change how IE works, so if you really want to do this, you have hoops you need to jump through, or you can fake it.

You can fake it by just living with multiple instances and synchronizing their state yourself.

If you really want to have just one, you can have your sidebar be simple a host for a child window. The child window is where all your functionality lives and you just re-parent the child window as the user switches tabs. However, there are some subtle issues there since IE8 allows different tabs to be in different processes, and re-parenting windows cross process has all sorts of implications (like attaching input queues and what if the creating process terminates). I'd recommend faking it.

jeffamaphone