Windows. showmodaldialog and window. Open

Source: Internet
Author: User

In an interesting situation, I don't know whether it is my experience or not.

If this problem occurs in the project, click a button on An ASPX page to bring up a page in showmodaldialog mode. There is a link in the pop-up page, and you want to click it through window. open the next window and hide the toolbar and address bar.

The strange thing is that, through the showmodaldialog window, the window. Open page is opened, even if location = No, status = No is written, the pop-up window still carries the address bar.

Page:

View code

 <HtmlXmlns= "Http://www.w3.org/1999/xhtml"> 
<HeadRunat= "Server">
<Title> </Title>
<BaseTarget= "_ Self"/>

< Script Language = "JavaScript" Type = "Text/JavaScript" >
Function Showdialog (){
Window. showmodaldialog ( ' Webform6.aspx ' , "" , '' );
// Window. Open ('webform6. aspx ', '', 'status = No, location = no ');
}
</ Script >
</Head>
<Body>
<FormID= "Form1"Runat= "Server">
<H5>Window. showmodaldialog ('webform6. aspx ', new object (),'');</H5>
<ASP: buttonID= "Button1"Runat= "Server"Text= "Showdialog"Onclientclick= "Showdialog ()"/>
</Form>
</Body>
</Html>

Open a modaldialog window through [window. showmodaldialog ('webform6. aspx.

B <modaldialog page content> page:

View code

<HtmlXmlns= "Http://www.w3.org/1999/xhtml"> 
<HeadRunat= "Server">
<Title> </Title>
<BaseTarget= "_ Parent"/>
< Script Language = "JavaScript" Type = "Text/JavaScript" >
Function Showopennewwindow (){
Window. Open ( ' Http://www.baidu.com ' , '' , ' Status = No, location = No ' );
}
</ Script >
</Head>
<Body>
<FormID= "Form1"Runat= "Server">
<Div>
<H5>
Window. Open (URL, '', 'status = No, location = no ');
</H5>
<ASP: buttonID= "Btnopen"Runat= "Server"Text= "Open"Onclick= "Btnopen_click"/>
</Div>
</Form>
</Body>
</Html>

Open a Baidu page through [window. Open ('HTTP: // www.baidu.com ', '', 'status = No, location = no.

Although location = No is clearly written, we still see the address bar ....

Open page B and click the open pop-up page to hide the address bar:

On page A, use window. Open to open page B, and then open the page through window. Open.

I don't know if there are any experts who know this and whether there is a way to solve the problem of opening a page without the address bar on the modaldialog page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.