Welcome Guest Search | Active Topics | Sign In | Register

Ajax Uploader and ASP.NET ModalPopupExtender Options
DavidProut
Posted: Thursday, January 8, 2009 6:48:43 AM
Rank: Member
Groups: Member

Joined: 1/8/2009
Posts: 12
Hi,

I'm just trialing the ajax upload control and it seems to fit all our requirements. However I've stumbled across a bit of a problem.

At the top of our web page we have a menu, and when the mouse is placed over any of the menu items we're using the ASP.NET Ajax ModalPopupExtender to show a Panel. The problem is that each of the "Browse" buttons and their associated textboxes (generated by the ajax upload control) are appearing above the Panel that is popped up by the ModalPopupExtender. I noticed that the HTML generated for the upload control does contain some style z-index attributes but I've tried fiddling with the z-index of my popup panel with no joy.

Interestingly enough none of the other controls generated by the ajax upload control exhibit the same problem.

Is this something anybody has come across before.

David.
eo_support
Posted: Thursday, January 8, 2009 7:23:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Our uploader does not use a high zIndex. However the parent element's zIndex affects child element's zIndex. For example, in the following HTML code DIV1 will be displayed below DIV2 even though it has a higher zIndex than DIV2. This is because DIV1's parent element has a lower zIndex than DIV2's parent element:

Code: HTML/ASPX
<div style="position:absolute;z-index:1;">
    <div style="position:absolute;z-index:200">DIV1</div>
</div>
<div style="position:absolute;z-index:2;">
    <div style="position:absolute;z-index:100">DIV2</div>
</div>


Thus you can try to move the Uploader and Modal Dialog Extender around (for example, place it right after the open form tag) to see if that resolves the issue. We also provide a Dialog control that provides similar functionalities, so you may wish to take a look of that and see if it works for you.

If none resolves the issue, please provide a test page reproducing the problem, we will be happy to take a look and see what we can find.

Thanks!
DavidProut
Posted: Thursday, January 8, 2009 8:16:08 AM
Rank: Member
Groups: Member

Joined: 1/8/2009
Posts: 12
Higher up in the page there was a DIV with position set to relative; removing that attribute fixed my problem. Strange.
eo_support
Posted: Thursday, January 8, 2009 8:20:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Thanks for the update! I am glad you got it working. That makes some sense. An element with its position set to either "absolute" or "relative" opens a new zIndex scope. This is similar to the example we posted in our previous reply, DIV1 and DIV2 lives in different zIndex scope because their parents are both "absolute".

Thanks!
DavidProut
Posted: Thursday, January 8, 2009 8:45:21 AM
Rank: Member
Groups: Member

Joined: 1/8/2009
Posts: 12
Hi,

In fact I had to put "position:relative" back on the existing div as removing it was causing other problems. But the clue to the fix was in the fact that elements with position = relative open a new zindex scope... so I put everything back as it was (ie my popup panel appearing behind the upload controls) and then set the z-index of the div that had "position:relative" to 99 and that fixed it.

Thanks.
eo_support
Posted: Thursday, January 8, 2009 8:59:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Excellent!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.