Re: what to do when I don't want back button funtionality in a browser of pages from 4d

2018-10-10 Thread ernie hilgers via 4D_Tech
I want to thank Paul Dennis and Epperlein, Lutz for their time and effort to 
answer on this subject.
As it seems, I have to insert JavaScript that do 'filter-work' in the 
background no matter what (for now). 

>> But there are some hacks around using javascript to mimic the behavior, e.g. 
>> look at https://stackoverflow.com/q/12381563/1865659.

I will get busy (again then) with the links supplied in the answer from 
Epperlein, Lutz. 
No way around this for now. Oh well it is what it is. 

Have a nice day. 

ernie hilgers(aruba)


> -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
**

RE: what to do when I don't want back button funtionality in a browser of pages from 4d

2018-10-10 Thread Epperlein, Lutz (agendo) via 4D_Tech
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
**

Re: what to do when I don't want back button funtionality in a browser of pages from 4d

2018-10-10 Thread Paul Dennis via 4D_Tech
This is a significant problem and not easily solved hence the use of a "back"
button on webpages. I use a combination of a tab object and buttons for form
filling in the browser. On each page the user can only proceed to the next
page or tab if they have filled in the mandatory information and the form is
validated. At this point I save the record to 4D. and so on through the form
filling process saving to update the record at each point. Despite this it
is still problematic if the user presses the back button.   

I would be interested to hear if anyone has a better solution.
Paul



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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
**