473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

page redirecting in javascript

hi friends...this is keerthi...i am doing a project where i want to redirect my page when ever the back button is clicked...for this i am using window.onbeforeunload method..and for page redirection i am using window.location and my code is as follows

<html>
<head>
<script type="text/javascript">
var confirm = true;
window.onbeforeunload = unload;
function unload()
{
if(confirm)
{
window.location="http://www.google.com";

}
}
</script>
</head>
<body>
<input type="submit" value="save" onclick="confirm=flase;"/>
</body>
</html>
but my page is not redirecting when ever the back button is clicked...

NOTE:when i use window.open() its redirecting but i dont want pop ups...
please any one could help mee...

byee
keerthi.
Apr 6 '07 #1
1 1424
acoder
16,027 Expert Mod 8TB
See this link.
Apr 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wes | last post by:
This should be really simple ... but how to do it has been eluding me ... I am writing an ASP.NET application and am using ASP.ImageButtons & ASP.Buttons. Instead of redirecting to another...
3
by: lozd | last post by:
Would appreciate any solutions people could offer for this. Basically I wan't to use a frameset with an aspx page as the contents rather than a htm page and I'd like to be able to redirect the...
13
by: AMC | last post by:
Hi, I have the below code in an asp page. When I run this page in IE or Opera it correctly displays the header info and does not redirect me to 'test.html'. However, when I run this in Netscape...
12
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
4
by: Greg Smalter | last post by:
Redirecting from page to page within a web project is pretty easy. However, all Redirect methods take strings as arguments, as if you mistype the string, you don't find out until run time that you...
1
by: IkBenHet | last post by:
Aldo it is something very simpel, it is not easy to find good information on this subject. For the moment we have only 1 ASP.NET page and we want that if vistors access it, this visit is logged...
5
by: mherman3 | last post by:
I have a page that sends a request to another PHP page on my site. If I try and set the header in the page that is being called, with header(Location: ...), the site doesn't get redirected like I'd...
2
nirmalsingh
by: nirmalsingh | last post by:
hai all, i am having 2 pages. login.html and city.html login.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...
1
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.