|
-
Apr 1st, 2002, 06:05 AM
#1
Thread Starter
Frenzied Member
History.back in JS
I will make a function, where I need information on the previous web page. Is there a document.location function where I can get this information? If the previous page is uk.htm then the language variable is "english". I have tried the code below, but it doesn't work? I only need information on which site was previous, I don't want to go back to this page.
Code:
function validate_website() {
if (history.back() == "uk.htm") {
language_var == "english"
}
}
if (history.back() == "d.htm") {
language_var == "german"
}
}
}
-
Apr 2nd, 2002, 12:23 PM
#2
Frenzied Member
try this
if (history.previous.indexOf("uk.htm") != -1) { language_var = "english"}
and if you want ot assign value to var use = not ==
== is to compare
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|