Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » need to refresh page on browser back button
need to refresh page on browser back button [message #402365] Sat, 09 May 2009 06:16 Go to next message
akki.Kumar
Messages: 7
Registered: May 2009
Location: baroda
Junior Member
In Application, data is insert on next button. and redirect to another page, but when press back button of browser then the page allow to insert same data. and i require to prohibit to insert data again.
Re: need to refresh page on browser back button [message #402370 is a reply to message #402365] Sat, 09 May 2009 10:14 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
one thing you must and must remember, pressing any button is equivalent to submit. You would have come to insert mode and filled data and incidentaly instead of pressing next you would have pressed back. Next with insert and take you to desired page. as well as any other key button submit action unless specifically prevented will initate the action originally invoked. This type of the problem will occur to freshers frequently and it will happen to seniors to due to absent mindness.
good luck
yours
dr.s.raghunathan
icon7.gif  Re: need to refresh page on browser back button [message #403220 is a reply to message #402370] Thu, 14 May 2009 05:37 Go to previous messageGo to next message
akki.Kumar
Messages: 7
Registered: May 2009
Location: baroda
Junior Member
next button on page 1,when press next, insert process call and insert data.and branch to page 2nd, Now when i press back button of browser then it come to previous state with data and allow to again insert data on next button. so i want to hide next button when press browser back button.
Re: need to refresh page on browser back button [message #403227 is a reply to message #403220] Thu, 14 May 2009 06:06 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
i assume the following:
Your are using OracleXE and apex
YOu are in page1.
when you press NEXT does some insert and branches to page 2.
before press Next, you are populating some for page variables which are created as P1_ ....
Now you have populated / entered the data.
instead of pressing Next you have pressed back button.
you may require two actions.
1. You may branch to some other page.
2. you do not need branching but want to initialise all the
variables
Apart from this under what occasion, you require to hide Next
button.
YOur requirement is not clear to me.

Anyway, if you want hide or display the button conditional display using some set values are possible. seting values to any of the page variable can be done through PL/SQL, or through process logics, or through computation etc.

help me (make me to understand) to help you.
yours
dr.s.raghunathan

[Updated on: Thu, 14 May 2009 06:07]

Report message to a moderator

Re: need to refresh page on browser back button [message #403287 is a reply to message #402365] Thu, 14 May 2009 10:40 Go to previous message
c_stenersen
Messages: 255
Registered: August 2007
Senior Member
I believe I understand the problem. (I've encountered it myself quite a few times). The user fills in fields, presses next, the page is submitted (so the value of the fields are actually in the page items as dr. s.raghunatan is saying, but they might be changed by the process for all I know). When the back button in the browser (not a back button defined on the page in apex) is pressed, the browser goes back, but it doesn't reload the page, and so it doesn't know that the values have already been submitted. The page on the server is actually in a different state than that which is shown to the user. (The user only sees the same screen he saw before pressing next.) The conditions on the buttons can't be made on the values of the items, because the pages aren't rendered again.
Am I correct?

I haven't found a way to reload it after the back button has been pressed (I've searched the web, but it seems that there's always some browser which doesn't support the solutions), but I guess what you could do is have a validation which checks some item to see if an insert has already been done, or if the values can be inserted. Then you can show an error msg to the user if he/she tries to insert it again.
Previous Topic: Why SOA or APEX
Next Topic: APEX Page Based Authorization Scheme
Goto Forum:
  


Current Time: Thu Apr 18 00:32:21 CDT 2024