Solved

@URLOpen and Back Navigation

Posted on 2009-03-31
10
852 Views
Last Modified: 2013-12-18
I have the following code, and it works.

My problem is if you click the Back button it brings up the previous window and will put the login page in various frames. Then if I click the refresh or reload button next to the URL the entire page will display the login screen.

Any ideas why this is happening ?
@URLOpen("http://" + @GetHTTPHeader("Host") + "/" + @WebDbName + "?Logout")

Open in new window

0
Comment
Question by:Michael Williams
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 24033041
It looks like you are logging out, so a login screen would be expected.

0
 

Author Comment

by:Michael Williams
ID: 24033188
Do you know of an @Function or @Command that can verify whether a user is logged in ?
0
 

Author Comment

by:Michael Williams
ID: 24033220
If I refresh the individual frames, the login page will appear in each. 2 of them still show the views associated with them. They are apart of a DB that allows Anonymous.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 166 total points
ID: 24033710
Since Anonymous does not require a log in, that makes sense.

0
 
LVL 3

Assisted Solution

by:ironclads
ironclads earned 334 total points
ID: 24061485
I don't know if this is what you need or if you can use it.  Personally, I use a check to see if the login page is being displayed in one frame and then reload the entire db again.  Here it is:

In the onload, put:

checkForExpiredSession()

In the JSHeader put:

(See Code Snippet)
var frameName
var doc
var timerTemp
var i
var timeOutTime = 0
var urlTemp
 
function checkForExpiredSession() {
	for (i=1; i < 4; i++) {
		if (parent.frames[i] != null) {
			if (parent.frames[i].document != null) {
				if (parent.frames[i].document.forms[0] != null) {
					if (parent.frames[i].document.forms[0].action != null) {
						if (parent.frames[i].document.forms[0].action != "") {
							doc = parent.frames[i].document.forms[0]
							tempString = doc.action.toUpperCase()
							if (tempString.indexOf( ".NSF?LOGIN" ) > 0) {
								window.top.location = urlTemp
								return false
							}
						}
					}
				}
			}
		}		
	}
	
	//Set timeout initially to 30 minutes before checking.
	if (timeOutTime == 0) {
		timeOutTime = 30
		timerTemp = setTimeout( "checkForExpiredSession()", 1800000 )
	} else {
		timerTemp = setTimeout( "checkForExpiredSession()", 2000 )
	}
}

Open in new window

0
 

Author Comment

by:Michael Williams
ID: 24061617
The only thing that happened was it added the login screen to a couple of the other frames. I need the entire page to go to the login screen. By default if you aren't logged in it will go to our login screen. Is there a way to force "_top" to refresh if they aren't logged in ?
0
 
LVL 3

Assisted Solution

by:ironclads
ironclads earned 334 total points
ID: 24061794
The code I provided is for one frame, preferrably a static frame, which loads once.  This frame manages the check for a login and if a login page is found in any other frame, it will load the "top" or frameset with the login url.  So, put the code into one of your frames that loads once when the frameset loads, or create a new hidden frame that opens a page with this code on it, then the next time it sees any of your frames with a login, it will load the top with the login url.

Let me know if you need further help.  Good Luck.
0
 

Author Comment

by:Michael Williams
ID: 25675416
Um
0
 
LVL 3

Expert Comment

by:ironclads
ID: 25720559
Um...what?  Um...Ok, or Um...need more help?
0
 

Accepted Solution

by:
Michael Williams earned 0 total points
ID: 25852985
We went with:

@URLOpen("http://" + @GetHTTPHeader("Host") + "/" + @WebDbName + "?Logout")

And use the following when we want to do a redirect:

@URLOpen("http://" + @GetHTTPHeader("Host") + "/" + @WebDbName + "?Logout&redirectto=http://" +  + @GetHTTPHeader("Host"))
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
names.nsf ODS upgrade 4 476
LOtusscript Scheduled Agent access to calendar  fails to get entries on 4 154
IBM Domino web server 5 74
attaching a file lotus notes 4 122
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question