?
Solved

Modal Dialog box

Posted on 2003-03-08
10
Medium Priority
?
2,978 Views
Last Modified: 2012-05-05
hi

i've the following code top pop up a modal dialog box.  the code is working fine.  but the thing is i dont want the IExplore icone in the title bar.  pls send the ideas.

 
<html>
<head>
<title>Dynamic Modal Dialog</title>
<script>
function showDialog()
{
     showModelessDialog('yougot.asp?type=mail&new=10',self,'dialogWidth:190px;dialogHeight:100px;center:yes;help:no;dialogHide:yes;resizable:no;scroll:no;status:no;unadorned:no;');
}
</script>
</head>
<body style="background-color:#d0d0d0">
<input type="button" onclick="showDialog()" value="Show Dialog">
</body>

Thank you
0
Comment
Question by:AspProgrammer
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 3

Accepted Solution

by:
gph earned 100 total points
ID: 8093859
As far as I know you can't remove the IE icon unless it's a trusted application.  If it's trusted you can remove the title bar using unadorned:yes; but then you would have no way to drag or close the window.
0
 
LVL 5

Assisted Solution

by:cirtap
cirtap earned 100 total points
ID: 8094004
For security reasons, windows and dialogs created from script in an HTML page are "branded" with the browser-icon and with it's name following (e.g. " - Microsoft Internet Explorer", " - Gecko ...").
If these hints were missing, a user would be unable to tell, if the dialog/window originates from the OS (trustworthy) or from the web-page (the Evil Enemy ;->).

Using HTA (HTML Applications) you can provide your own icon, but it requires the .hta file beeing "installed" on the user's machine.

CirTap
0
 
LVL 3

Expert Comment

by:gph
ID: 8094022
cirtap, how would you replace the icon in an hta?  I know it can be done with the application itself but know of no way to do it with a modal dialog launched from an hta.
0
Technology Partners: 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!

 
LVL 5

Expert Comment

by:cirtap
ID: 8094049
hmmm, actually I have no idea :).
I only thought of the main HTA application window only, to be honest.
"Maybe" if you use another HTA file as the source for the modal dialog?
Never tried. Sorry.

CirTap
0
 
LVL 3

Expert Comment

by:gph
ID: 8094075
I've tried and wasn't successful.  I was hoping you knew something I didn't :)
0
 
LVL 1

Expert Comment

by:MatrixDud
ID: 8094704
to make it modal use: onBlur="self.focus()" in the body tag of the popup.

To get rid of all the other crap in the window open up the new window using this script (put it in the head of you opener):

//myURL = the url to be displayed i the new window
// w = width of the new window
// h = height of the new window

var newWindow = '';
function OpenNewWindow( myUrl, w, h )
{
   var leftPos = (screen.availWidth - w) / 2;
   var topPos = (screen.availHeight - h) / 2;
   if( leftPos < 0 ) leftPos = 0;
   if( topPos < 0 ) topPos = 0;

   if( !imageWindow )
   {
      newWindow = window.open(myURL, "_blank", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=" + w + ",height=" + h + ",resizable=no,top=" + topPos + ",left=" + leftPos );
   }
   else
   {
      if ( !newWindow.closed )
      {
           newWindow.location.href = myURL;
           newWindow.focus();
      }
      else
      {
           newWindow = window.open(myURL, "_blank", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=" + w + ",height=" + h + ",resizable=no,top=" + topPos + ",left=" + leftPos );
      }
   }
}



Notice that if the window is already open it won't open it again. YOu probably won't need that since you're setting onBlur in the <body>. This is a handy script though that you can re-use time and time again.

0
 
LVL 1

Expert Comment

by:MatrixDud
ID: 8094738
AS for the titlebar. You can remove it, but the it's a pretty complex script that's invloved. This link has the Chromless javascript that accomplishes it:

http://www.siteexperts.com/tips/techniques/ts05/page3.asp

As for just replacing the Application Icon in the title bar...that's at the application level and can really only be done with a skinning app which is totally up to the end user to install. You can change the website's icon so if the user bookmarks your site using favicon. It will also apear in the navigation bar on the site. This link has more info on that:

http://www.codeproject.com/html/favicon.asp

0
 
LVL 5

Expert Comment

by:cirtap
ID: 8094756
@matrix: this will remove all window "crome" (or crap as you call is), but not the window-title bar incl. it's icon...
and that was the question.

@AspProgrammer: you may search MSDN-Library on how to open a window in so-called "Kiosk Mode" in MSIE and resize it.
IMHO these windows suck, but you may play with the "idea"...

CirTap
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10112648
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: gph {http:#8093859} & cirtap {http:#8094004}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

621 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