•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 430,111 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,210 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1343 | Replies: 3
![]() |
Hi experts,
I used Window.showModalDialog to open comment.aspx.
I need to disable the X button(top right button of IE) in my comment.aspx as entering comments is compulsory.
I've done several days of research but to no avail.
I'm guessing that it's not possible even if I use javascript.
Any ideas how can I do that?
I used Window.showModalDialog to open comment.aspx.
I need to disable the X button(top right button of IE) in my comment.aspx as entering comments is compulsory.
I've done several days of research but to no avail.
I'm guessing that it's not possible even if I use javascript.
Any ideas how can I do that?
Serene Joey
•
•
Join Date: Dec 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I am afraid it can't be done. I was looking for the same thing a couple of months back and apparently its not allowed for some nonsensical reason. If you want a good looking message or confirm box, you might wanna try doing it with JavaScript in the form of a div within a div. The outer div occupies the full screen and blanks it out (lightbox) and the inner div's the message. The only downside is its not a modal dialog. You can achieve that by passing a function reference and associated parameters in the showMessage JS function, and call them when the user clicks the OK button etc.
This works well enough. I have got it running on a production environment and it hasn't given me any trouble. Hope it helps.
Cheers
- Vivek
ASP Syntax (Toggle Plain Text)
var g_oncomplete = false; var g_eventArgs = false; // onCompleteFunc: Function/Script in string format that will be executed using eval function showMessage(message, onCompleteFunc) { // Dump the onCompleteFunc and eventArgs into global vars g_oncomplete = onCompleteFunc; // Display the message (check out Lightbox for ideas) } // This is tied to the message's OK button. function ok_onclick() { if (onCompleteFunc && onCompleteFunc != "") eval(onCompleteFunc); }
Cheers
- Vivek
Last edited by peter_budo : May 24th, 2008 at 7:10 pm. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- disable parent window (JavaScript / DHTML / AJAX)
- Enter key does not work in window.showModalDialog (JavaScript / DHTML / AJAX)
- Exit code and prompting message box (ASP.NET)
- Help... (JavaScript / DHTML / AJAX)
- Popup window on button click (ASP.NET)
- Internet Explorer Bug lets you run DOS commands remotely (Web Browsers)
Other Threads in the ASP.NET Forum
- Previous Thread: ASPNETBD.mdf deployment problem
- Next Thread: Visual Studio 2008 Data Source Selection


Linear Mode