943,837 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 645
  • VB.NET RSS
Nov 27th, 2008
0

form submitting twice

Expand Post »
Hi.

I need help in vb.net.

We have a page that opens a pop-up modal dialog with a form via JavaScript. The pop-up opens when a button from the parent window is clicked. The pop-up contains a textarea that has a required field validator. Once the user clicks the OK button on the pop-up, it closes itself and reloads the parent window giving it a REJECTED status and hides the button for calling the pop-up.

Everything from that point is good but when you click on the back button a few times, it goes back to the page where you have to reject the form again. The status reverts to the old one and the button calling the pop-up is shown again. When the user clicks the button, the pop-up is called and you can reject the form AGAIN.

If the form is already rejected, the pop-up should display a message saying the form is rejected instead of a textarea. It seems that the pop-up window doesn't reload itself you call it from a few pages back.

This is the page_load of the pop-up window:
VB.NET Syntax (Toggle Plain Text)
  1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2. If (b_prf.PRFStatus() = Constants.PRFRejected) Then
  3.  
  4. lblRequestedBy.Visible = False
  5. lblRequestedByReject.Visible = False
  6. lblDateRequested.Visible = False
  7. lblDateRequestedReject.Visible = False
  8. lblReason.Visible = False
  9. txtReason.Visible = False
  10. btnOK.Visible = False
  11.  
  12. Response.Write("PRF already rejected.")
  13. Else
  14. AssignValuesToControls(b_prf.Retrieve(State.PrfID))
  15. End If
  16. End Sub
  17.  
  18. Private Sub AssignValuesToControls(ByVal prf As PRF)
  19. 'display details
  20. lblRequestedByReject.Text = prf.User
  21. lblDateRequestedReject.Text = prf.DateRequested
  22. lblPRFID.Text = prf.PRFCode
  23. End Sub

Help would be appreciated. Thanks

-dork
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
omgdork is offline Offline
6 posts
since Aug 2008
Nov 27th, 2008
0

Re: form submitting twice

It seems that the modal dialog shows a cached version. Is there any work around to this? Like say add a random string at the end of the url?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
omgdork is offline Offline
6 posts
since Aug 2008
Nov 28th, 2008
0

Re: form submitting twice

Okay so the appended random string works in Firefox and Chrome but it doesn't work in IE6/7. Any ideas?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
omgdork is offline Offline
6 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Line By line printing on Crystal Report
Next Thread in VB.NET Forum Timeline: Localization of MSFlexgrid





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC