473,396 Members | 1,758 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,396 software developers and data experts.

Ie 7 Tabs

My website requires that users don’t open my website url in multiple tabs. Opening the url in new window is allowed.

My question is, is there a way in javascript or otherwise to prevent users from opening the same url in multiple tabs?

Regards...

Manjit Sarma,Nobel Software Systems Pvt. Ltd.
Bangalore
May 21 '08 #1
4 1303
Frinavale
9,735 Expert Mod 8TB
My website requires that users don’t open my website url in multiple tabs. Opening the url in new window is allowed.

My question is, is there a way in javascript or otherwise to prevent users from opening the same url in multiple tabs?

Regards...

Manjit Sarma,Nobel Software Systems Pvt. Ltd.
Bangalore
Yes there is JavaScript that opens a new window but doesn't open the page in a new tab. The JavaScript "window.open()" method will do this for you.

If you set your hyperlinks to "target=_blank" used to open the page in a new window, but now they open in new tabs.

So to open a page in a new window you need to apply the window.open JavaScript method to your button or hyperlink for the JavaScript "onclick" event...

Expand|Select|Wrap|Line Numbers
  1. MyButton.Attributes.Add("onclick", "javascript:window.open(""" + "MyPage.aspx""" + ",""" + "NameForOpenWindow""" + ", """ + "toolbar=no,menubar=no,width=850,height=400,resizable=yes,scrollbars=yes""" + "); return false;")
  2.  
Please note that I added a "return false" after the window.open() method. This prevents postback from occurring.

Cheers!
-Frinny
May 22 '08 #2
Plater
7,872 Expert 4TB
What is the difference whether its opened in a new windows or in a new tab?
May 22 '08 #3
Frinavale
9,735 Expert Mod 8TB
What is the difference whether its opened in a new windows or in a new tab?
Sometimes you don't notice a page being opened in a new tab..

Or when you have a help page being opened for the aspx page the user's viewing, you want the help to be in a new window so that you can see both it and the aspx page at the same time....
May 22 '08 #4
Thanks for the reply.I will use the code to fix the issue.

Regards...

Manjit Sarma
May 23 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dan Jacobson | last post by:
In wdg-html-reference/html40/block/pre.html there is no mention about how ASCII tabs (^I) are to be rendered. I suppose all bets are off? Wait, my docs go thru html-tidy first, and it says...
2
by: Jim Hubbard | last post by:
I need an example of tabs usage like you might do in a tabbed browser application. I need to be able to open one or more tabs with customer data. Every tab is laid out exactly alike, only the...
1
by: Bill Gates | last post by:
Hello, I am creating oblique tabs for a webapp. It needs to be oblique tabs, and not regular tabs that you see in web browsers. Here's how it looks like: http://auriance.com/docs/interaction/ As...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
6
by: Stephen Edwards | last post by:
I am a novice, so bear with me. I designed a website using CSS TABS, all was fine, then I copy and pasted meta name, etc for keywords, tweaking it where necessary for keywords. I did not notice...
15
by: Tom Plunket | last post by:
The documentation for dedent says, "Remove any whitespace than can be uniformly removed from the left of every line in `text`", yet I'm finding that it's also modifying the '\t' characters, which...
35
by: Ben | last post by:
Hi, I have a python script on a unix system that runs fine. I have a python script on a windows system that runs fine. Both use tabs to indent sections of the code. I now want to run them on the...
0
by: doos | last post by:
Does anybody else find the handling of tabs by sql 2005 annoying, I've went as far to post a comment/suggestion to the Microsoft connect site, ...
5
by: wayniac | last post by:
I have a database built on 4 tabs, but inside one of those tabs I would like another group of tabs. The problem is that my second group of tabs are being displayed on ALL of the main 4 tabs and not...
7
by: Phil Reynolds | last post by:
I'm using a tab control in Access 2000, and the user requested to have buttons in the form header, instead of the built-in tabs (so that when they scroll down, they can still switch tabs). Now,...
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
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,...
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
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.