开发者

form submit not working in firefox but works fine in IE

开发者 https://www.devze.com 2023-01-01 23:29 出处:网络
I want to submit my parent page when I click on submit button of the child page. In my child page I\'ve written my code as

I want to submit my parent page when I click on submit button of the child page. In my child page I've written my code as

string scriptString = "<script language=JavaScript> window.opener.document.forms(0).submit(); </scrip开发者_StackOverflowt>";

            // ASP.NET 2.0

            if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString))
            {

                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", scriptString);

            }

it is working fine in IE but not working in Firefox. What could be the alternate method for this?

Thank in advance


try to replace forms(0) with forms[0]

I don't think Firefox likse parentheses for arrays.

0

精彩评论

暂无评论...
验证码 换一张
取 消