does any one have any idea how to go back to a calling (previous page) from the present one you are in;
1. without clicking the 'back' button on the toolbar
2. and still retain the values that a user already filled in in the previous page you are returning to (i.e. - the user should not have to fill in the values afresh)
3. maybe using the on click event of a button, or any other method.
What i'm doing is that i've got a sign-up form. Since the signup form can be accessed from many pages, i'm trying to use javascript to go back to the page the person comes form. so what i'm using is this:
PHP Code:
This works perfectly.. BUT.. in some browsers i have to press refresh to have the changes made.
E.g. index.php says "hello guest" after signing in some browsers say "hello user" some like ie5 say "hello guest" (if i refresh, then it says "hello user")
So is there anyway to goback to the previous page in history and not to use the cache?
<script language="JavaScript" type="text/javascript"> if (confirm("Are you sure to delete?")) { self.location = 'delete.php' } else { history.go(-1); } </script>
The above code give an alert with two choices(confirm or cancel). If the user clicks the cancel button, it will go to previous page. If the user clicks the confirm button, it will go to delete.php.
I like to make it like the following. If the user clicks the cancel button, it will go to previous page. If the user clicks the confirm button, It will proceed reading the next code.(the next code contains the code for deleting.)
I tried to remove "the self.location = 'delete.php'" as a test.
Code: <script language="JavaScript" type="text/javascript"> if (confirm("Are you sure to delete?")) {
} else { history.go(-1); } </script>
The above code do; If the user clicks the cancel button, it will go to previous page. If the user clicks the confirm button, it will proceed reading the next code. So the deleting will be done.
It seems work fine.
But if the user clicks the cancel button, It will go to prevous page and the deleting will be done.(it might proceed reading the next code)
I have create a spinnrer (numeric up and down field) in my form.Below is the code for it:
<form action="create_session.php" method="post" name="createsession"> <!-- This will post the form to its own page"--> <table cellpadding="0" cellspacing="0" border="0">
I want users to work from a main application. Certain things will need to be done but the users wont want to see the main screen go away while doing these certain things. So my idea is to just open a new window with the content they need, they'll make their changes, the new window will close but then I want the main page to reload.What I've done now is at the end of the script that will be run prior to the new window closing is added this (its a php app):
I am trying to write a script that uses the IF statement to see wether or not a user clicked the back button to come to a page, and then if it's true to not let the page load and kick them back X number of pages (say 4) This is what I have so far:
I have page A that redirects to page B. Now I want to go back to the page I came from(Page A). Using javascript:history.go(-1)"> I can go back but not in FireFox , It by pass the previous page. How can I solve this problem. Is there a way to get previous page URL
I would like to expire my session when a person enters different url in the navigator bar other than my url and comes back to my url.
For example if i visit example.com and then i type gmail in the same navigator bar and then move back to my url example.com through browser back button then i have to end the session of my client i mean he has no more access to my site.
I'm -very- green when it comes to Javascript, but I'm working my way up. The problem right now I'm running in to now is when trying to implement a website function that allows two buttons (previous, and next) to do their respective tasks.
I can get the script to go forward and back, however when I jump to another page in the frame (this is all through iframes), when clicking either button, it will take me to the last page I had stopped on. A little hard to explain, but maybe seeing the code will give you a better idea.
<script type="text/javascript"> var pNum=0; var maxPage=10; function next() { pNum++; if (pNum > maxPage) pNum=10;
[Code]...
It's nothing fancy, but it's apparently keeping the last page it was on in memory instead of resetting itself, so when I go back to the start page it starts on page 0 and goes to page 10; right now I can stop on page 5, click a link to go back to the starting default page, and when using the 'next page' button it will start on 6 and go from there.
I need to put previous/next navigation button images on a lot of slides.If i am on slide 3 I'd like javascript to identify previous button as slide2.html and next button as slide4.html and so on
I'm buildning a permissions system. If the database check shows that the user doesn't have access to the PHP script she tries to access, I want to diplay an alert window telling her so. And when she presses the "OK"-button, I want the browser to send here back to the previous page that she came from.
Is this a javascript problem? Is there a quick and dirty solution?
you're going to have to bear with me on this one, I'm not sure if this should be in Jscript or PHP at the moment, I can't get my head around it.
Basically, I have a page, which has 3 standard href links on it. All three links open a PHP powered form on a different page. This form contains a series of checkboxes in an array. Now what I need to achieve is to have certain checkboxes, checked based on the href used on the previous page.
I have a credit card donation page and what I wanted to do is after they click the submit button and transaction is successfult I wanted to capture the donation amount they enter from the donation page and show it to the next page.
I'm using a JQuery function to slide a div into and out of visibility, but every time I toggle, the browser resets my view to the top of the web page..What I want to happen is when you click to reveal the div, the page scrolls down and the div content is in full view. When I click again to re-hide the div, I want the page to scroll back up smoothly instead of just reverting to the top of the whole page...The page url is: http:[url]....Here's my code:
I'm just starting up in web design and I have an interesting challenge that I'm hoping can be solved w/java script. I have a site with an application form. When the form is to be submitted, the form data needs to be emailed to the correct person to handle that particular application. However, that can't be determined by anything specific in the form. It can only be determined by the link that they clicked on to get to the form. I really don't want to have 22 identical forms with just a different EmailTo addie, which is what the previous site developer did. Someone please tell me this can be done w/java script? If not w/java script
I am trying to get the back button or just a go back to work with an Ajax div? here's a minimal ajax enabled bldd.nl/stackoverflow/pagination/indexMinAjax.php but i want it to be ajax enable with the back button and for this i am trying BBQ
how do i make the page go all the way to the top after you press the back button?
for example, you would go to page 1 and you scroll mid-way, then you press a link to page 2. then you press the back button on page 2 and takes you back to page 1 but it brings you back to the section where you scrolled mid-way.
is there any way to make it so it will automatically bring you to the top of the page. ive seen it on other sites.
after hitting 'back' button I'm taken to spot on page where I was, but I'm being asked to do the opposite -- take user to the top of the page, after hitting 'back' button... when I look up this issue, most people complain of the opposite - that the browser takes them to to top of the page after hitting 'back' button...;-) [URL] is there a way with JavaScript to force page to go to the top of the page when you navigate to a back via 'back' button?
I have a page that has links to other pages. I want to be able to detect when the user has clicked on Back (or typed Backspace) to move back to my page. Is this possible?