473,662 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7847
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.transfer s, 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.goo glegroups.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.transfer s, 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**********@g mail.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
629
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 suggest some solution or any other alternate approach. Early response is appreciated. Regards,
6
3153
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 href="#">bahbahbah</a> Does not work, as it is still clickable. It only changes the color to grey.
1
6008
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 discovered that my web app is definately NOT Back/Forward safe. It's really messing with my SQL data bigtime. Thanks.
9
24154
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 help! Thanks much, Junlia
16
6258
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
1802
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 Web Form,Web Form1.aspx and Web Form2.aspx,Now From Web Form1.aspx When I Click One Button (Disable), Then Web Form2.aspx Buttons
3
11980
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 Open Search in Explorer bar (E = 69) CTRL+I Open Favorites in Explorer bar (I = 73) CTRL+H Open History in Explorer bar (H=72) CTRL+ click In History or Favorites bars, open multiple CTRL+LEFT ARROW When in the Address bar, move...
6
50174
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 useful in my project. Can we pass any argument in window.open() method so the purpose can be solve. Regards, Harman
3
11644
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 very new to VBA,i tried to follow the instructions reported in the code,but i got no result,i still can use the shift key,can you explain in details how to use it correctly to enable/disable users from pressing shift key to view database windw?,the...
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.