473,394 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to disable open in new tab?

Dear All,
I would like to know how to disable 'open in a new tab' or 'open in a new
window' feature coz I would like to maintain parameter using session id
which is not change if we using those two feature. In fact I would like to
make my web application stay on one web browser windows during the session.

Regards,
Gun
Aug 2 '06 #1
4 7796
You can disable or even raplace the right click menu using JavaScript.
However opening pages in new windows does not affect the session at all. The
only way to end the session is to close all bowser windows/tabs or be
inactive for a period of time defined in your web servers config.

In short when you open in a new window, the session is maintained.

"Gunawan" wrote:
Dear All,
I would like to know how to disable 'open in a new tab' or 'open in a new
window' feature coz I would like to maintain parameter using session id
which is not change if we using those two feature. In fact I would like to
make my web application stay on one web browser windows during the session.

Regards,
Gun
Aug 2 '06 #2
Gunawan wrote:
Dear All,
I would like to know how to disable 'open in a new tab' or 'open in a new
window' feature coz I would like to maintain parameter using session id
which is not change if we using those two feature. In fact I would like to
make my web application stay on one web browser windows during the session.

Regards,
Gun
But what if the user copies the address from the address bar and copies
that into a new window manually? Or they bookmark the page and use that
to get a second window open. Those are just two off the top of my head
- there would be other ways of circumventing this disabling.

Best is: Redesign the application to cope with this situation. Second
best is to warn the user at the outset, then if you detect something
has gone amiss, react to it (possibly with a large page of text that
says "I told you not to do that").

Of course, if your application is based entirely on postbacks and
server.transfers, you may be able to engineer it to detect the second
page being opened (Basics being that if you get into Page.Load,
IsPostback is false, and nothing has been manually added to the
HttpContext to indicate that a Server.Transfer has occurred, then you
know that it's a fresh page request, and you should react accordingly)

Damien

Aug 2 '06 #3
ClickOn and Damien, Thank you for your reply.

What I want to do is maintain Session. If user open a new windows by
copy/paste
on the address bar, it is seems no problem as long as they have different
session id.

What I would like to do is to prevent the same session id from many web
browser
windows. For example I would like to maintain value of product id in
session, then if
user open the same page on different windows then I would be confuse what
the right
product id for each web windows.

Thank you,
Gun

"Damien" <Da*******************@hotmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
Gunawan wrote:
>Dear All,
I would like to know how to disable 'open in a new tab' or 'open in a new
window' feature coz I would like to maintain parameter using session id
which is not change if we using those two feature. In fact I would like
to
make my web application stay on one web browser windows during the
session.

Regards,
Gun

But what if the user copies the address from the address bar and copies
that into a new window manually? Or they bookmark the page and use that
to get a second window open. Those are just two off the top of my head
- there would be other ways of circumventing this disabling.

Best is: Redesign the application to cope with this situation. Second
best is to warn the user at the outset, then if you detect something
has gone amiss, react to it (possibly with a large page of text that
says "I told you not to do that").

Of course, if your application is based entirely on postbacks and
server.transfers, you may be able to engineer it to detect the second
page being opened (Basics being that if you get into Page.Load,
IsPostback is false, and nothing has been manually added to the
HttpContext to indicate that a Server.Transfer has occurred, then you
know that it's a fresh page request, and you should react accordingly)

Damien

Aug 3 '06 #4
In article <OR**************@TK2MSFTNGP02.phx.gbl>, Gunawan
<jg**********@gmail.comwrites
>What I would like to do is to prevent the same session id from many web
browser windows. For example I would like to maintain value of product
id in session, then if user open the same page on different windows
then I would be confuse what
the right
product id for each web windows.
Basically you can't prevent it. Thankfully the web designer is not in
control of the user's browser. You cannot stop them opening the page in
a new tab or window, nor should you try. You should remember that the
user is in control, not you, and you have to design your application to
work the way the user wants. If they find it convenient to open a link
in a new window, then you have to account for that and make sure your
application will work.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Aug 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ashvin Navare | last post by:
Hi, We want to disable BACK & FORWARD button of the browser so that user is forced to navigate through the menu options provided in the site. The browser used is Internet Explorer only. Please...
6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
1
by: Terry Olsen | last post by:
Is there any way to disable the client browser "Back" and "Forward" buttons while on my site? Or how would I go about knowing that a page hit is caused by a back/forward navigation? I have...
9
by: junlia | last post by:
Does anyone how how can we disable the auto-postback feature in asp.net page? I have to use a server side control in the page, but the auto post back feature in it causes problems for me. Please...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
0
by: Ahmad Jalil Qarshi | last post by:
Hi! I have a problem while developing some webpages.The Problem is that:- How We Can Disable The Controls Of One Web Form From Other Web Form In Asp.net? Explanation:- There Should Be Two...
3
by: vanya | last post by:
i have been tryin to program(javascript) to disable the following keystroke combinations CTRL+O or CTRL+L Go to a new location (O = 79 L = 76) CTRL+S Save the current page ( S = 83) CTRL+E...
6
by: harman.sidhuz | last post by:
Hi How we can disable parent window while popup window is open? i am using window.open() method to open new popup window. As per my requirement, showModalDialog() or showModelessDialog() is not...
3
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.