Showing posts with label popup. Show all posts
Showing posts with label popup. Show all posts

Wednesday, March 28, 2012

Change the event that causes the popupcontrol to shows the control

I want to use popupcontrol with a textbox, but I want it shows the popup just when the onKeyDown event fires. How can I do it (if it can be done)?You'll want to look at modifying the way PopupControlBehavior.js's this.initialize function attaches its events. You'll probably need to customize the events a little, but it shouldn't require many changes.

Monday, March 26, 2012

Centering Modal Popup Extender? (Edited)

Hello again,
I have a problem: i cant get a modal popup control to be centered!
The problem occures in some resolutions...
The control isn't in any divs or something like that, but i tried to put it in center aligned divs, no effect...
Edit:see last reply.

At 1280*1024 resolution, no problem:

(Link:http://www.intensitysoft.info/txtFiles/1280,1024.JPG)

At 14490,900 resolution, no problem:

(Link:http://www.intensitysoft.info/txtFiles/14490,900.JPG)

At 1280*800 resolution... BIG problem :):

(Link:http://www.intensitysoft.info/txtFiles/1280,800.JPG)

As you can see the panel is totally left...

Thanks for any help,
Liran.


The page seems to work fine in all my resolutions, but I don;t have 1280 X 800 available on any of my box's. Could you please post your code, maybe something will jump out.

-Alan


<%@. Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="Default4"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="AccessDataSource1">
<SeparatorTemplate>
<br />
</SeparatorTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" style="width: 100%; height: 10px; border-top-width: 1px; border-left-width: 1px; border-left-color: #33cccc; border-bottom-width: 1px; border-bottom-color: #33cccc; border-top-color: #33cccc; border-right-width: 1px; border-right-color: #33cccc;">
<tr>
<td style="font-weight: bold; font-size: 16px; text-transform: none; color: black; font-family: Arial; background-color: #3399cc; text-decoration: none;" colspan="2">
<%# Eval("siteName") %></td>
</tr>
<tr style="background-color: lightblue; font-size: 14px; color: black; font-family: Arial;">
<td style="width: 133px; height: 90%">
<asp:ImageButton ImageUrl='<%# Eval("thumbPicSrc") %>' ID="ImageButton1" runat="server" />
</td>
<td style="height: 90%" valign="top">
<%# Eval("description") %></td>
</tr>
</table>

<ajaxToolkit:ModalPopupExtender OkControlID="imgOk" BackgroundCssClass="modalBackground" ID="ModalPopupExtender1" TargetControlID="ImageButton1" runat="server" PopupControlID="Panel1" />
<asp:Panel ID="Panel1" runat="server" style="display: none">
<asp:ImageButton ImageUrl='<%# Eval("picSrc") %>' ID="imgOk" runat="server" />
<br />
</asp:Panel>

</ItemTemplate>
</asp:Repeater>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="App_Data\instensUsersDB.mdb"
SelectCommand="SELECT * FROM [sites]"></asp:AccessDataSource>
<asp:ScriptManager id="ScriptManager1" runat="server" />

<br />

<br />
</asp:Content>


Just found out that the problem doesn't occur because of the resolution, it occures because of the browser!
With Internet Explorer 7 everything is fine, so on with FireFox... but with I.E. 6, it's just doesnt work.

Any solution?
Liran.