Close Tabs And Or Windows When 2nd User Tries To Sign In To Site

Feb 21, 2011

Imagine a wife has signed on to a web site in a browser tab. She does not sign off and walks away to do something else. Her husband sits at the computer and seeing her signed on, opens a new tab and tries to sign on to the same site.

I am trying to write a script that will close other tabs/windows when the husband goes to the same site to sign on.

So, on the sign on page (or even better, the sign off page), when the sign on button is clicked, a piece of Javascript code is run first. The javascript simply goes through all tabs on the browser, and checks to see if any such tabs has an HTML document that came from the same domain as the sign on page. If such tabs exist, then before POSTing the user name and password to the server, the Javascript code will close those tabs that contain HTML documents came from the same domain.

So, I understand I need to set the window.name to a specific value. But does anyone know what the code on the sign on/sign off page to close the other tabs/windows would look like?

View 1 Replies


ADVERTISEMENT

Script That Will Close Other Tabs - Windows - When Goes To Same Site To Sign On

Feb 21, 2011

Imagine a wife has signed on to a web site in a browser tab. She does not sign off and walks away to do something else. Her husband sits at the computer and seeing her signed on, opens a new tab and tries to sign on to the same site.

I am trying to write a script that will close other tabs/windows when the husband goes to the same site to sign on.

So, on the sign on page (or even better, the sign off page), when the sign on button is clicked, a piece of Javascript code is run first. The javascript simply goes through all tabs on the browser, and checks to see if any such tabs has an HTML document that came from the same domain as the sign on page. If such tabs exist, then before POSTing the user name and password to the server, the Javascript code will close those tabs that contain HTML documents came from the same domain.

So, I understand I need to set the window.name to a specific value. But does anyone know what the code on the sign on/sign off page to close the other tabs/windows would look like?

View 2 Replies View Related

Removing Cookies Once You Sign Out Or Close Explorer

Jul 23, 2005

I would like to remove cookies once I sign out of a website or close explorer is there such an option to do this?

View 3 Replies View Related

Trap The Window.close() Event When The User Clicks On The Close Button Of The Browser

Jul 20, 2005

I want to trap the window.close() event when the user clicks on the close button of the browser using javascript. Can anyone shed light on this problem ?

View 1 Replies View Related

Opening New Windows/Tabs

Nov 18, 2006

How can I make this script I generated with HomeSite, open links in new
windows/tab instead of the same? ....

View 4 Replies View Related

JQuery :: Change Default $ Sign To Any Other Sign Like # Or @

Aug 18, 2010

how can I change default $ sign to any other sign like # or @ etc. The basic problem is when I try jquery with mootools js then mootools have also default $ sign so that bot are conflict to each other.

View 4 Replies View Related

Opening Multiple Windows Or Tabs

Aug 4, 2011

I am currently designing a website for our public library. I have added a card catalog search bar on the side of every page. Our catalog software company has supplied the code. After embedding it, I previewed each page to make sure it was working properly. At the time, it worked fine. Since then, I have added other elements to the homepage such as a Twitter feed and a Flickr slideshow. Now, when I attempt to search in the catalog search bar on the homepage, it opens two tabs, but only in Firefox.

Our IT person from the software company suggested I make a copy of the page and strip the code down to see what the problem is. After doing this, I have made no headway. Even with the catalog as the only code left on the page, other than text, it still opens two tabs.

[Code]...

View 3 Replies View Related

Close Multiple Tabs/complete Browser On IE 7?

Jan 12, 2010

Need some help on closing the IE browser, having multiple Tabs. Currently we can close the current tab with window.close(), but is there any other way where we can close the complete browser having multiple tabs by writting some logic program...???

View 1 Replies View Related

Open Multiple Browser Tabs And Then Close

Feb 22, 2011

I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once.

View 1 Replies View Related

Open Multiple Browser Tabs With Script And Then Close Them ?

Feb 22, 2011

I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once.

View 2 Replies View Related

AJAX :: Windows XP - Yahoo Hosting - Site Worked Fine In IE But Not In Firefox

Apr 8, 2010

I ran in to a strange problem with a client who uses Yahoo hosting. The web site uses AJAX (jquery, php, javascript). There is no problem viewing the site using IE8, Firefox on a Windows 7 computer. On an XP computer the site worked fine in IE, but not in Firefox. The site never worked properly using Chrome or Safari.

I tried jquery 1.3.2 and 1.4.2 but got the same results.

I use this same combination (jquery, php, javascript) on other web hosts and don't have these problems.

I know that Yahoo hosting injects tracking code in the web pages it serves for the sites it hosts (at least for my client). I think this could be the source of the problem.

When I removed jquery (I was only using the load function anyway) and used my own code- the problem disappeared. The site now works in all browsers.

View 2 Replies View Related

Enlarge The Image With A Close Button In Site?

Oct 8, 2010

I want to enlarge images in my site with a close button, by clicking on zoom link/button. How to do this?

View 2 Replies View Related

Pop Up Windows On User Command

Jul 20, 2005

We have an app in which we want to enable our users to open numerous
documents in new browser windows.

I got the new window open thing down but each time I open a new document it
opens it in the same popup window. I want to be able to select new documents
and open those selected documents one at a time in a new browser window as
the custormer selects a new document to open.

View 3 Replies View Related

Get Current Logged In User (Windows)

Aug 3, 2010

I got a small issue and don't know where to start. What I need: I need a user to browse a certain website, and retrieve its Windows username there. What I need it for: I want to build a form on the intranet, where I will automatically fill the user's data, like his Name, Email-Adresse, Phone-Number etc. What I got:

- IIS7 with anonymous access on the whole intranet.
- Active Directory
- Any webdevolpment tool except PHP, but especially JavaScript, ColdFusion, ASP..

I google'd like the whole morning, but couldn't come up with a solution. Just found stuff where it says that you cannot get the user with anonymous access and stuff. So I need either confirmation of this information, or any hint where to start looking..

View 2 Replies View Related

Add Onfocus Alert Pop Up When User Tabs Into A Certain Field?

Jun 16, 2010

i would like to add a onfocus alert pop up when a user tabs into a certain field

so say if i had

<td align=center><input maxlength=1 size=1 id="end" class="notnumber" name="18n_">

when the user tabs in to the textfield an alert pops up displaying a informaiton messaage

View 1 Replies View Related

Pull A User's NT ID (Windows Log On) And Store It In A Variable

Oct 19, 2010

We need to find a way to pull a user's NT ID (Windows log on), and store it in a variable for use later on, and also to watermark the screen on HTML pages in an eLearning course. I have no idea how to do this and I can't seem to find anyone who has encountered a need for this.

View 1 Replies View Related

User Can Close The Browser Or To Open The Window Browser Without Or With A Disable Close Window Button?

Apr 5, 2009

I need to know if the user close the browser or to open the window � browser without or with a disable close window button How can I???

View 6 Replies View Related

Log Out The User When Close The Browser

Jun 24, 2009

I want to log out the user when close the browser, so i need to call the java script function when close the window. I used the onunload and onbeforeunload event but it should call on each page navigation and page refreshing. My necessity is, The function should call only at the time of browser closed..that should be mainly supported in all browsers...

View 1 Replies View Related

Warn The User Before Window Close

Aug 14, 2010

I have a php application that launches a window that is used for a database import/update (which is closed automatically when the import/update is complete). The thing is that the user could close this window and i want to pop up a warning message (but only if the user closes it) that the user can cancel (stop the closing of the window) or select OK to close the window.

I have been looking for a javascript script that accomplishes this but without luck. Does anyone know how to do this or if it's possible? (i only know a little javascript)

View 4 Replies View Related

Warn User When He Tries To Close Page

Oct 9, 2009

I want to display a notification message to users when they close a tab or browser window. What event happens when a user closes the browser?

View 6 Replies View Related

Creating Popup Windows - Add A "Close Window" Button On Survey.html Page

Mar 13, 2010

I read about window object and specifically about creating popup windows. The code below produces a popup window when a link is clicked:

Code JavaScript:
var Survey =
{
init: function()
{
var surveyLink = document.getElementById("survey");
Core.addEventListener(surveyLink, "click", Survey.clickListener);
},
[Code]....

I would like to add a "Close Window" button on survey.html page and when that button is clicked, the window would close. How do I do that? I know that I should use (reference to popup window).close(), but how and where do I attach even listener to that button?

View 1 Replies View Related

Detect When User Browser Goes To Another Web Site

Jan 14, 2007

Is there any way that an Apache server can recognise that a users browser has changed from your web site to another site. ie. is there a way of executing a CGI based on when the address bar no longer has your FDQN.
Would this be via Javascript [if possible?] or ???

View 3 Replies View Related

Detect When A User Leaves Site?

Aug 3, 2009

I need to take some action when the user leaves my website. By leave I mean one of the following two cases:

1) Closes the browser
2) Goes to some other site (different domain)

Is there a way to detect this? I know that the event onbeforeunload and onunload gets fired when the user leaves the page, but these also get fired when the user leaves page A in my site and just goes to page B in my site. I don't want to alter every link within my site to fire the onclick event and in such event to "remember" in a JavaScript variable this is a navigation within my site. I am looking for some clean solution if one exists. For example, is there a way to get the information in the DOM where the user is going to when the onbeforeunload or onunload are fired?

View 6 Replies View Related

User Defined Info. Throughout The Site?

Aug 1, 2001

I don't know if I can/should do this w/ JavaScript on the client or can/should this be done on the server - and if so what language would be best?

Here's my goal:
I am asking users 4 questions - depending on the one selected - that answer creates a profile and that profiles stays with them throughout the site.

E.G.; if (women under 30) is selected this information will stay on the site throughout w/ content detailed for this group.

View 3 Replies View Related

Validating A Checkbox - User 'tabs' Over The Option Doesn't Validate Real Time

Oct 21, 2010

I have the checkbox validation. I have it set onClick, this works perfectly with both the mouse click and also if the space bar is used to select the option, which is great. However if a user simply 'tabs' over the option it doesn't validate real time. The solution I came up with was adding a onKeyDown event to trigger the same function.

Code:
<input type="checkbox" id="M_TERMS" name="M_TERMS" value="1" onClick="vldTERMS(this.id);" onKeyDown="vldTERMS(this.id);">

View 4 Replies View Related

JQuery :: Delay() And Click() - Allow The User To Close The Div By Clicking On It

Mar 9, 2010

I'm trying to display an alert message (a div with text) that fades in, and after 6 seconds fades out automatically. That's easy, but I also want to allow the user to close the div by clicking on it if they so desire. The problem is, the delay() function overrides the click, or so it seems -- clicking does nothing unless I remove the delay().

Here's the code I'm using:

I've tried reordering and combining these into a single statement but it yields the same result.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved