Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #7568

Re: Why is history.back doing a reload with Chrome and Safari?

From Andreas Bergmaier <andber93@web.de>
Newsgroups comp.lang.javascript
Subject Re: Why is history.back doing a reload with Chrome and Safari?
Date 2011-10-19 20:23 +0200
Organization albasani.net
Message-ID <j7n4i3$4ph$1@news.albasani.net> (permalink)
References <j7m2ao$6ci$1@dont-email.me>

Show all headers | View raw


ViLco schrieb:
> I'm using Ajax and I have pages with many input tags where user can insert
> data. My js function edit some input tags as well, using
> document.getElementById("elementname").value = myvalue
> After having set data on page1 and clicking a button, a js function will
> redirect the browser to page2 where the user will choose between an OK and a
> Cancel button. The OK button calls a JS function that does some work and
> then redirects the browser back to page1 via a history.back() command.

For what do you need a second page? Why don't you just show the confirm 
dialogue on page1? There are lots of ways to do that, you even should be 
able to do this with Ajax as you're already used to it, if you need to 
send/fetch server data to/from the server.
If there is a good reason for a second page, just post your form data to 
page2 instead of "redirecting with a js function". Page2 then could be 
served as a prefilled, hidden form with your "OK" button to submit it.
  Bergi

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Why is history.back doing a reload with Chrome and Safari? "ViLco" <villiber@tin.it> - 2011-10-19 10:38 +0200
  Re: Why is history.back doing a reload with Chrome and Safari? "ViLco" <villiber@tin.it> - 2011-10-19 12:26 +0200
  Re: Why is history.back doing a reload with Chrome and Safari? "Tom de Neef" <tdeneef@qolor.nl> - 2011-10-19 18:37 +0200
  Re: Why is history.back doing a reload with Chrome and Safari? Andreas Bergmaier <andber93@web.de> - 2011-10-19 20:23 +0200
    Re: Why is history.back doing a reload with Chrome and Safari? "ViLco" <villiber@tin.it> - 2011-10-20 09:47 +0200

csiph-web