| |

VerySource

 Forgot password?
 Register
Search
View: 625|Reply: 2

[Help] About the call between the parent page and the child page of the iframe

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-10 11:00:01
| Show all posts |Read mode
A main page is composed of a parent page and an iframe child page. I now want to return to the main page via a hyperlink from another page, and the iframe page corresponding to the link is also displayed at the same time. (The iframe page is a dynamic page and is displayed according to the text of the link. Corresponding page), how should this effect be achieved? I wrote a program with asp.net. Everyone help, thank you! !
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-11-10 17:30:01
| Show all posts
May I ask the host to solve it, I also encounter the same problem now, I look forward to your help and kind citizens,
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-11-10 17:45:01
| Show all posts
In the main page.cs:
        if (!String.IsNullOrEmpty(Request.QueryString["id"]))
        {
            int formId = Convert.ToInt32(Request.QueryString["id"]);
            
            loadMenu(formId);

        }

    protected void loadMenu(int formId)
    {
        string script = String.Empty;
      
        if (!String.IsNullOrEmpty(Check(formId)))
        {

            script += "<script language=\"javascript\">\n";
            script += "GoTo('" + Check(formId) + "');";
            script += "</script>";

            ClientScript.RegisterStartupScript(typeof(Page), "", script);
        }
        

    }

.aspx: js: function GoTo(url)
    {
         window.frames["mainFrame"].location=url;

    }
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list