Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with refresh
Message
From
17/08/1999 16:01:32
 
 
To
17/08/1999 15:44:41
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00254356
Message ID:
00254684
Views:
17
>>>>Is there a way to tell if a page has been created from the refresh? like a onRefresh event? We're working with drumbeat and we need to keep the person from reposting from previous data.
>>>
>>>Could you expand? I started to write your answer to this, and realized I have no idea what you might mean...
>>>
>>>The server can't tell if the request comes from a "refreshed" page, because the browser sends the same form data every time. Usually, this is handled in data on the server side- if the same user has submitted data to the same method in within a certain timespan, you can reject the request...
>>
>>Alright, we're using one page that will be able to add/edit/delete. We've got a hidden variable that we send up to determine what "mode" we're in. The problem is that after we've added a record, the mode is set to "add" and if the user reposts from data he gets another add. We are trying to prevent that second add on the refresh, but we're not sure where to set a variable that will tell us we're dealing with a refresh instead of a straight insert.
>
>Do you mean that the resulting page after the add is the same as the page that posted the add request, and you don't want the user clicking add again? If this is the case, the result page needs to have a variable set to signify to the server that this page has already been submitted once. Either this, or like I said before, check for duplicate data in the add routine, and reject the add if the data has already been submitted once.
>
>I guess I am getting lost on what you mean by "refresh".

When you hit refresh on the screen, there is a messsagebox that asks "Repost from data?" The problem we are trying to tackle is when the user presses Yes from this messagebox. We're not sure how to implement a variable that will not be affected by the repost from the data. We tried using a session variable, but we don't have access to this variable on the client side, so we can't set the variable when any of the buttons get pushed prior to re-calling the page.

I know there's a way to deal with this problem. I just don't know how to go about it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform