RSS Forums RSS

form submitting twice

Please support our VB.NET advertiser: DiscountASP.NET – 3 Months Free on VB.NET Web Hosting
Reply
Posts: 6
Reputation: omgdork is an unknown quantity at this point 
Solved Threads: 0
omgdork omgdork is offline Offline
Newbie Poster

form submitting twice

  #1  
Nov 27th, 2008
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:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (b_prf.PRFStatus() = Constants.PRFRejected) Then

            lblRequestedBy.Visible = False
            lblRequestedByReject.Visible = False
            lblDateRequested.Visible = False
            lblDateRequestedReject.Visible = False
            lblReason.Visible = False
            txtReason.Visible = False
            btnOK.Visible = False

            Response.Write("PRF already rejected.")
        Else
            AssignValuesToControls(b_prf.Retrieve(State.PrfID))
        End If
    End Sub

    Private Sub AssignValuesToControls(ByVal prf As PRF)
        'display details
        lblRequestedByReject.Text = prf.User
        lblDateRequestedReject.Text = prf.DateRequested
        lblPRFID.Text = prf.PRFCode
    End Sub

Help would be appreciated. Thanks

-dork
AddThis Social Bookmark Button
Reply With Quote  
Posts: 6
Reputation: omgdork is an unknown quantity at this point 
Solved Threads: 0
omgdork omgdork is offline Offline
Newbie Poster

Re: form submitting twice

  #2  
Nov 27th, 2008
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?
Reply With Quote  
Posts: 6
Reputation: omgdork is an unknown quantity at this point 
Solved Threads: 0
omgdork omgdork is offline Offline
Newbie Poster

Re: form submitting twice

  #3  
Nov 28th, 2008
Okay so the appended random string works in Firefox and Chrome but it doesn't work in IE6/7. Any ideas?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Views: 381 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:14 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC