Hi,

at first it isn't possible to switch off the back button in a browser. But 
there are some hacks around using javascript to mimic the behavior, e.g. look 
at https://stackoverflow.com/q/12381563/1865659.
But all these techniques are not safe, I wouldn't recommend any of them. 

Better is to deal with the input of the user in 4D avoid saving the same data 
again or something like that. You can do some locking, but that's difficult 
with http because it is a stateless protocol, but you can work around it with 
the use of cookies. E.g. you can generate an unique cookie (with a UUID value 
e.g.) with the request of your page 1, afterwards only one save request with 
this cookie is accepted by 4D. 

This are my 2 cents ...

Regards
Lutz Epperlein



> -----Original Message-----
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of setar accnt 
> via
> 4D_Tech
> Subject: what to do when I don't want back button funtionality in a browser 
> of pages
> from 4d
> 
> Hi All,
> I am a fledgling developer trying to become more proficient in using 4D and 
> the web
> for in-house applications.
> 
> Sinds many years 4D is capable to send, to the Web browser, the HTML page of 
> the
> Web file stored in the document whose pathname is supplied.
> 
> Every page I send to the browser is cached (back), so if I send first :
> page 1, where user enters an account# or other unique identifier
>    this info is send back to 4d, a query is made (if found)
> page 2, is shown with info to, possibly, change
>    say the data is updated, the page info is send back to 4D, acknowledged
> page 3, is send stating successful acceptance of the data.   All 3 pages 
> designed with
> simple HTML and inline css.
> 
> If I have 15 such case one morning, I might have 15x 3 pages possibly in the 
> cache at
> that one station / smart device.
> Pressing the back-button I can go back and update the data once more and 
> again send
> the page to the 4d database,
> which is an absolute no-no.
> 
> Is there a technique or standard that is used with 4D environment that use a 
> different
> approach, besides elaborate javascripts that bent
> and force website behavior to behave, e.g. no back button which does work for 
> one
> browser and not another.
> 
> Any tips on this would be very welcome.
> 
> In my ignorance I am thinking like, put up 1 screen for input identifier
> same screen (with other html) put up the requested data
> at acknowledgement, redraw again screen 1 for input of identifier.
> 
> thus no back-button action possible (?), what’s wrong with this picture ?
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to