Form submit doesn't work in firefox, but works fine in IE

I want to send the parent page when I click the submit button on the child page. On my child page, I wrote my code as

string scriptString = "<script language=JavaScript> window.opener.document.forms(0).submit(); </script>"; // ASP.NET 2.0 if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString)) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", scriptString); } 

it works fine in IE, but does not work in Firefox. What could be an alternative method to do this?

thanks in advance

+2
source share
1 answer

try replacing forms (0) with forms [0]

I don't think Firefox is like parentheses for arrays.

+5
source

Source: https://habr.com/ru/post/1393242/


All Articles