Wednesday, March 21, 2012

ModalPopup : how to cover the whole browser (ie all divs) ?

Hi all,

I have a page with 3 divs : the top div for the menu (navigation), the left div for a thin decoration and the main central div for the content itself.

When I click on one of the items of my repeater, the modalpopup shows up but thegray background only covers the main central div, not the other 2.

Please check the attached screenshot.

My question is : is there a way for mygray background to cover the whole browser ie all my divs ?

thank you

I am also experiencing the same problem. Anyone?

Let me know if you find a solution.


I have done limited testing, however, I was able to fix the problem by modifying the ModalPopupBehavior.js file:

I commented out the appendChild and replaced it with the code block around line number 75 of the script

 //this._foregroundElement.parentNode.appendChild(this._backgroundElement); if (document.forms != null && document.forms.length > 0) { document.forms[0].appendChild(this._backgroundElement); document.forms[0].appendChild(this._foregroundElement); this._foregroundElement.style.zIndex = 10001; }


Here's some background on the issue:http://forums.asp.net/ShowPost.aspx?PostID=1357977

Perhaps you can help me!

I've been looking this issue for quite a bit now. I am using the latest march release of the toolkit now (with my mods). I have changed the initialize to perform the following:

 //this._foregroundElement.parentNode.appendChild(this._backgroundElement); if (document.forms != null && document.forms.length > 0) { document.forms[0].appendChild(this._backgroundElement); document.forms[0].appendChild(this._foregroundElement); this._foregroundElement.style.zIndex = 10001; } else this._foregroundElement.parentNode.appendChild(this._backgroundElement);

All was working fine for me, until I nested a popup within a popop, now I am getting the following error:Sys.InvalidOperationException: Two components with the same id '{0}' can't be added to the application.

I tried a number a variations to the above with no success. I am now playing with the dispose method. Should I give up on this? or continue on the track I am on.

HELP!


Ok, day two of trying to solve my problem. In addition to work item 8360, I wrote a function that zero's out the zIndexes on the show of the modal and resets them when the modal hides. Again, all seemed fine, until I tried to pop a modal from a modal. Is there a global array that will give me the list of all the registered popups? If so I can exclude them from my logic.

I also had to use a property runtimeStyle that is specific to MS IE. We'll have to find a work around for that.

Any help would be appreciated!!!


http://forums.asp.net/1631945/ShowThread.aspx#1631945

No comments:

Post a Comment