I am having an issue when I post the form from my shopping cart - it works great in Internet Explorer but does not work in Firefox. Has anyone else had this issue and found a solution?
Thanks Angie
Here is the submit button sub:
Protected Sub button_CheckOut_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles button_CheckOut.Click
… load shopping cart, validate etc
Dim s As String = myremotepost.returnForm(newDataTable.Rows(0).Item("AuthorizeNet_ServerURL").ToString)
Response.Write(s)
Me.myPostScript(Page)
End sub
This is the code that submits the form:
Protected Sub myPostScript(ByVal Page As System.Web.UI.Page)
Dim strScript As New System.Text.StringBuilder
strScript.Append("<script language='javascript'>")
strScript.Append("var ctlForm = document.getElementById('frmPP');")
strScript.Append("ctlForm.submit();")
strScript.Append("</script>")
'Registerclientscriptblock does not work in firefox
ClientScript.RegisterClientScriptBlock(GetType(Page), "PPSubmit", strScript.ToString, True)
'RegisterStartupScript does not work in ie or firefox
'ClientScript.RegisterStartupScript(Me.GetType(), "PPSubmit", strScript.ToString)
End Sub