Jandost Khoso

Hello,

Can anybody tell me how can i retrieve IE opened tab's title Actually in IE 6.0 for every new windows session is lost. although same applies to new window in IE 7 but in new tab session is unchanged so if a user opens a new tab he/she has same session.

What i want is to restrict user to open a link in new tab (if it is already opened).

Thanks in advance



Re: Internet Explorer Extension Development IE Tabs

IECUSTOMIZER

Hi Jandost,

You use a named frame as your target value in either your link or window opener script. eg

<a href=http://www.website.com/aPage.aspx target="MyPage">Open my page as one instance</a>

<script language="javascript">

window.open('http://www.website.com/aPage.aspx','MyPage')

</script>

<noscript>You need scripting enabled in order to use this web site</noscript>

There are also the 'hidden' named targets of '_main',( FF equivalent is '_content'), '_top', '_self', '_search' and '_media'(<=IE6 only) and '_blank'. Note that if you use a '_blank' target, IE7 will decide how to open the window depending upon the tabs and popup blocker settings.

Tabs are no different to windows, each tab is a container for an 'Internet Explorer_Server'.

Regards.






Re: Internet Explorer Extension Development IE Tabs

Jandost Khoso

Hello,

Many thanks for your reply but unfortunately it did not solve my problem because i am still facing same session issue. Let me re-phrase what i need.

I have one page and one Object in same page. i want to restrict user to open more tabs/windows browsing same page. Because if user requests that page more than once, object in page will be also created more than once. i want to restrict only one object per user.

Now, come back to problem area. When user browses page, a session is created for that user. now if user copies URL and try to browse it in new IE window i can easily find that he is requesting page once again by simple session checking. But if he pastes the URL in new tab same page with same session is created for me so that i can not restrict him. I want to create a new session by opening a new tab or something lead to One Object per Session.

Any help is highly appreciated.





Re: Internet Explorer Extension Development IE Tabs

IECUSTOMIZER

Hi Jandost,

I don't understand what you are trying to achieve

To prevent users opening more than one instance of a page (and any embedded ActiveX control) use the ShowModalDialog method i/o the Window.open method. Test the document.parent.name when the page is loaded to ensure that it has been loaded into that page and not loaded from the address bar of IE. If they have used the address bar, redirect them to an error page to prevent access to the page from the address bar.

This will create a modal window that the user will be unable to navigate from until they have completed processing or choose to close the window. Again if you use a named window, other calls made from other running instances of the browser will switch focus to the already loaded modal window. If your processing requires a number of pages/steps to be completed, set <base target="_self"> (in the <head> tags) to ensure that all navigation remains in the current modal window and is not spawned in new windows/tab.

The drawback is that this method is missing from other (mozilla) browsers (there is the IE tabs extension that will enable moz browsers to emulate IE and display modal windows). So you may want to test for the IE browser.

Regards.