Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

history.back based upon last visited URL 2

Status
Not open for further replies.

Nogi

Technical User
Dec 10, 2004
132
BE
In reference to my previous posting about history.back with password that can't work, i may have found a way around somehow.

Is it possible with javascript to open a page based upon the last url in the history list?

Example:

i'm on the page index.htm
The previous page i've loaded is test.htm
When i click the next button, i get forwarded to test.htm again.

Same example as above, but with the previously loaded mine.htm as URL. When i click next i go to mine.htm again.

Is this possible? I think it would bypass my previous problem.
 
Is it possible with javascript to open a page based upon the last url in the history list?
You cannot test the value of the history.back... it is not available to read. This is a security feature.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Ok, that leaves me with nothing lol.

Thanks for your fast reply Jeff.

Cheers
 
what exactly is it that you're trying to do? there may be other ways to go about what you want that you just haven't thought of.

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
I have a page: index.htm
The page contains an asp-page displaying the results of a database. (let's say database.asp)

The database is password-protected, so the connection string of database.asp contains a password.

When the page database.asp is opened, and leads to another page (ex. page1.asp), whenever somebody wants to return from page1.asp back to database.asp, the users gets prompted for the database password.

So i was searching for a way to ether:
* bypass the password request
* or add the password in the "back" command on the page1.asp

I don't know why with the history.back-command the connection string of the database.asp isn't fully reloaded so the password doesn't need to be entered, but somehow this is the case.

I was hoping to get it done with an external .js file containing the back-command on the page1.asp with the password in it so a user doesn't have to type it, but i don't know if this can be done.

No worries for the password to be revealed in the external .js, cause it will be compiled into an .exe file.

 
Can't you use the session values for that?

AFAIK, that's the way most pages go.

Cheers,
Dian
 
thanks for your help all. I've posted the question in the asp-section referring to the session object you guys are talking about.

Maybe that might do the trick

Thanks again and in case our ways wouldn't meet again, happy new year.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top