Feb 12, 2013, 2:45 PM
[CLOSED] Dynamic form blur listener not firing in IE 9 and above...
Hi,
I've created a dynamic form, and added a listener on the blur event of the fields that are created.
The javascript is called fine from Chrome, but not IE 9 and above..
Here is the code that creates the form:
I've created a dynamic form, and added a listener on the blur event of the fields that are created.
The javascript is called fine from Chrome, but not IE 9 and above..
Here is the code that creates the form:
[DirectMethod]
public void RecreateForm(object o, DirectEventArgs e)
{
string[] date = e.ExtraParams["dateInfo"].Split(new string[] { "-" }, StringSplitOptions.None);
int portfolioId = Convert.ToInt32(this.hidPortfolioId.Text);
PortfolioCompany co = PortfolioCompany.SingleOrDefault(oo => oo.PortfolioCompanyId.Equals(portfolioId));
WPDBDB db = new WPDBDB();
var titles = db.FinancialResultGrid(Convert.ToInt32(this.hidPortfolioId.Text), Convert.ToInt32(date[0].Replace("Q", string.Empty)), Convert.ToInt32(date[1])).ExecuteTypedList<FinancialResultGridResult>();
var form = new FormPanel
{
ID = "FormTaskPanel1",
// RenderFormElement = false,
Border = false,
AutoScroll = true,
// LabelWidth = 150,
// LabelAlign = LabelAlign.Left,
Padding = 5
};
foreach (var title in titles)
{
if (!title.IsCalc)
{
NumberField df = new NumberField();
df.FieldLabel = title.Title;
df.ID = "Control_" + title.PortfolioPerformanceTitleId.ToString();
df.Value = (title.Value == null) ? string.Empty : title.Value.ToString();
df.LabelStyle = (title.IsCalc) ? "font-style:italic;padding-left:8px" : "";
hidControlIds.Text += title.PerformanceDataId.ToString() + ":";
df.IDMode = IDMode.Explicit;
df.Listeners.Blur.Handler = string.Format("ClientSaveChanges(this.value,{0},{1});", (title.PerformanceDataId != null) ? title.PerformanceDataId.ToString() : "0", title.PortfolioPerformanceTitleId);
form.Items.Add(df);
}
}
this.pnl.Items.Clear();
form.Render(this.pnl, RenderMode.AddTo);
}
Is there a better way to handle this event that is more cross browser compliant?
Last edited by Daniil; Feb 19, 2013 at 3:33 AM.
Reason: [CLOSED]