Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Monday, March 26, 2012

Modal Popup Extender positioning

Hi

I have a div that centralises the webpage in the browser, this is relative and then I have absolute positioning of graphics inside this, etc.

Problem I have is when adding the ModalPopupExtender, it goes pearshaped, the popup is top left and the modal background is underneath the div container, I have positioned the Extender in various places and sometimes its behind other div's etc...

Whatever I do it wont appear on top, any ideas?

Thanks

R

Have you tried setting the z-index of the modal popupextender TargetControlID (Panel)? set the z-index to 1000 and it should show some difference.

Let me know what happens.

Saturday, March 24, 2012

Modalpop larger than browser window

I am having a problem with a modal popup that is larger than the browser window. The modal popup contains a gridview, and can be large. I cannot figure out a way to scroll using the browswers scrollbars. I just noticed the Modal popup on this ASP.NET site to submit source code, and thought that would be perfect. Can anyone help me get started implementing a modal such as that?

Thanks

you can set the width & height of the Panel that you are using for popup.

Eg. <asp:Panel id="panelpopup" runat="Server" CSSClass="modalPopup" Width="600px" Height="400px" />


Thanks for the reply.

It appears I am still having a few issues. One is that regardless of what sizes I specify, if results in the gridview don't have enough room, it will automatically make it big enough to fit it in, but the ModalPoppup doesn't grow with it. It seems like the size of the panel would grow with the data inside of it, but for some reason the data will flow out of the ModalPopup. Also, if it returns too much information, or if a user makes their browser window smaller than the size of the popup, they cannot scroll to see it all. I can scroll the page below the popup, but the popup always recenters itself.


Does anyone have a solution for this?

Wednesday, March 21, 2012

ModalPopup - content shows briefly when page loads

Hi,

I have a some problem with the modalpopup control. Its on everytime a full postback happens, the browser "displays" all the content of my modalpopup, in way that how it's going to look like when you dont add the extender to your panels. The panels then "disappear" after the page is loaded, and the modalpopups work as they are supposed to.

how do i prevent the panels from "blinking"/showing on full page postbacks?

Add style="display:none;" to the panels.


this seems to work. thanks!

however i have one question. before, I was adding display:none; to my panels through the css class on a separate css file. it wouldnt work that way since the panels will disappear forever. it only works when i put display:none; on the <asp:Panel> from the html source. why is it like that?


I believe that the modalpopup works by toggling the style attribute but if you have display:none permanently set in the CSS then it isn't going to work. Bit of a pain I know but not a huge deal to add it to the panel.

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