Aug 20, 2010, 2:11 PM
[CLOSED] [0.8.2] Validation message in multifield
I've come across a display issue when using validation messages with MsgTarget set to Under in a MultiField control. I've included sample code.
In IE7 you can replicate the issue by clicking Login to generate the messages, which will be correctly positioned at first. Then click on, or tabe to, one of the text fields and the message will jump under the other control (LinkButton).
In FireFox 3.6.8 the message doesn't correctly display at all - it starts after the LinkButton and wraps under it.
Is there a setting/property I'm not setting, or a workaround for this?
In IE7 you can replicate the issue by clicking Login to generate the messages, which will be correctly positioned at first. Then click on, or tabe to, one of the text fields and the message will jump under the other control (LinkButton).
In FireFox 3.6.8 the message doesn't correctly display at all - it starts after the LinkButton and wraps under it.
Is there a setting/property I'm not setting, or a workaround for this?
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script runat="server">
protected void btnLogin_Click(object sender, AjaxEventArgs e)
{
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<ext:FormPanel
ID="LoginFormPanel"
runat="server"
Title="Login"
Width="400"
Height="220"
Frame="true"
Border="true">
<Body>
<ext:FormLayout ID="FormLayout1" runat="server">
<Anchors>
<ext:Anchor>
<ext:Label ID="PanelHeader" runat="server" HideLabel="true" Text="Please enter your User Name and Password below to access the site."></ext:Label>
</ext:Anchor>
<ext:Anchor>
<ext:MultiField ID="MultiField1" runat="server" FieldLabel="User Name">
<Fields>
<ext:TextField ID="UserName" runat="server" AllowBlank="false" MsgTarget="Under" BlankText="User Name is required." />
<ext:LinkButton ID="LinkButton1" runat="server" Text="Forgot?"></ext:LinkButton>
</Fields>
</ext:MultiField>
</ext:Anchor>
<ext:Anchor>
<ext:MultiField ID="MultiField2" runat="server" FieldLabel="Password">
<Fields>
<ext:TextField ID="Password" runat="server" InputType="Password" AllowBlank="false" MsgTarget="Under" BlankText="Password is required." />
<ext:LinkButton ID="LinkButton2" runat="server" Text="Forgot?"></ext:LinkButton>
</Fields>
</ext:MultiField>
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Body>
<Buttons>
<ext:Button ID="btnLogin" runat="server" Text="Login">
<AjaxEvents>
<Click
Before="if(!#{LoginFormPanel}.getForm().isValid()) { return false; }"
OnEvent="btnLogin_Click">
<EventMask ShowMask="true" Msg="Verifying..." MinDelay="1000" />
</Click>
</AjaxEvents>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>
Last edited by Daniil; Aug 24, 2010 at 3:08 PM.
Reason: [CLOSED]