Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Trying for a "modal" layer in MSIE
 

javaguy@sbcglobal.net




quote this post edit post

IP Loged report this post

Old Post  12-13-05 - 11:52 PM  
I'm working with code from the book "Ajax in Action" (by Dave Crane,
Manning Press).  The chapter 6 code has a "notifier" object.  It will
show a dialog box with messages in it by attaching a
DIV-TABLE-TBODY-TR-TD construct with document.body.appendChild().  It
shows a modal dialog box by attaching a full-screen div with
document.body.appendChild() and then attaching the
DIV-TABLE-TBODY-TR-TD construct to that full-screen div.  A snippet
follows:

msg.createDialog=function(id,bar,isModal){
var dialog=document.createElement("div");
dialog.className="dialog";
dialog.id=id;
var tbl=document.createElement("table");
dialog.appendChild(tbl);
dialog.tbod=document.createElement("tbody");
tbl.appendChild(dialog.tbod);

..

if (isModal){
dialog.modalLayer=document.createElement("div");
dialog.modalLayer.id="modallayer";
dialog.modalLayer.className="modal";
dialog.modalLayer.appendChild(dialog);
document.body.appendChild(dialog.modalLayer);
}else{
dialog.className+=" non-modal";
document.body.appendChild(dialog);
}

..

}

The CSS class "modal" is:

.modal{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-image:url(img/modal_overlay.gif);
}

In Mozilla (Mozilla FireFox) this works very well.  When a modal dialog
the entire browser space is covered by the background image, except for
where the foreground dialog is.  Rollovers and clicks on objects other
than the dialog are ignored.

In MSIE the dialog appears and accepts clicks, the background image
doesn't display and clicks and mouseovers are accepted outside of the
dialog.  In short, non-modal.

Is there some trick to making this work in MSIE?  I've been using MSIE
6.0.

Thanks,

Jerome Mrozak



Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 02:27 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top