UPDATE - the below code when put in page2.html works, but when I hit "cancel" on the dialog box, it refreshes the page2 - can this be prevented? thank you.
[HTML]<head>
<script language="Javas cript">
<!--
function onBak()
{
var chk_message = "do you want to continue?";
var times = 0;
if (times == 0)
{
var leave = confirm(chk_mes sage);...
User Profile
Collapse
-
-
ok..i have now tried both of your suggestions - neither seems to be working
so here's my code
=============== ====page1.html= =============== ===========
[HTML]<html>
<head>
<script>
function nextPage()
{
window.location .href = "page2.html "
}
</script>
<form name="next_page ">
<tr>
<td align="bottom">...Leave a comment:
-
redirect to another page when browser back button is clicked
Hi,
I am trying to redirect the user to another page (other than the previous one in the browser's history) when the browser's (IE's) BACK button is clicked. I found this snippet, but am finding it difficult in getting it to run :(
[CODE=javascript]if (history.previo us)
{
document.locati on="page_to_go_ bak_to.html";
}
[/CODE]
Could any of you please provide a small example... -
thanks guys
Fred - I will be sending a small set of values, so I am not worried about maxing out the length, but thx anyways.Leave a comment:
-
thanks,
I was trying to pass them via the URL but I can only pass static values
ex: <input type="button" name="Button1" value="Go to 2nd Page" onclick="locati on.href='2ndpag e.html?attr1=20 &attr2=60'" disabled="disab led">
whereas I want to pass variables whose values are not predetermined, I have tried something like below but it doesnt work
...Leave a comment:
-
Navigating Pages and passing values
hi,
I am creating a quiz application in Javascript where each page has one question. I would like to calculate the score and time taken to answer all questions at the very end - how do I achieve this? Can I pass values (like score for each question and time taken to answer that question) to the next page so that I can total it at the very end?
OS: Windows
thank you.
No activity results to display
Show More
Leave a comment: