Solved

How to Disable Browser's Close Button when Page open using ShowModalDialog()

Posted on 2011-03-22
2
542 Views
Last Modified: 2012-06-21
lnkViewReport.Attributes.Add("onClick", "window.showModalDialog('Page.aspx?ID=" & ID.Text & "&View=Y&Print=N" & "','','dialogHeight:700px;dialogWidth:1000px')") 'Open Page
0
Comment
Question by:Jinal_Shah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 35196379
When you use window.open, you can set titlebar to no or 0, but it is usually ignored, see http://www.w3schools.com/jsref/met_win_open.asp.

An alternative is to create a draggable div instead of a popup.

Another alternative is in case you want to call a javascript function before closing the window you may use the 'onbeforeunload'-event ... normally i think this is the typical reason to want to have the close-button disabled ... so you may capture the closing of the window and may do something you want in that case ...


0
 

Author Closing Comment

by:Jinal_Shah
ID: 35340275
i have already done this but not used.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Powershell Code 3 42
Understanding ping command in Ubuntu 5 30
send to option in chrome 11 37
Powershell PGP and SFTP 1 10
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Several part series to implement Internet Explorer 11 Enterprise Mode
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question