sintaks
5 Jun 2007, 1:21 PM
Greetings!
I'm having an issue with quicktips. When my form is submitted and errors are returned, the icon doesn't appear next to the input element (though the red line does appear). When I hover over the input field, a slim div takes over the width of the screen, with the most left portion containing the icon and the error text.
The architecture of the application is as such:
The screen is split into north and center using the layout manager.
The center area contains two tabs. The tab in question loads an iframe. This was a workaround because I couldn't get loadScripts to work with a ContentPanel.
Inside this iframe is a full HTML declaration, complete with its own copy of extjs. It has a center/east fixed layout. The center layout contains a gridview, and the right column contains a few buttons.
Clicking on the button brings up my LayoutDialog. This dialog has one tab. Its source is loaded via an XHR call. It returns basic form HTML.
This basic form HTML is then transformed using the following code:
Form : {
Convert : function(form_id, save_url) {
var retForm = new Ext.form.BasicForm(form_id, {url: save_url});
var frm = Ext.get(form_id);
var form_elts = frm.dom.elements;
var processed = new Object();
for(elt in form_elts) {
var current_elt = null;
if(form_elts.item(elt) instanceof HTMLInputElement && typeof processed[elt] == 'undefined')
{
var type = form_elts.item(elt).getAttribute("type");
switch(type){
case 'text':
current_elt = new Ext.form.TextField();
current_elt.id = form_elts.item(elt).getAttribute('id');
processed[elt] = true;
break;
}
}
if(current_elt)
{
retForm.add(current_elt);
}
}
retForm.render();
return retForm;
}
}
As you can see, I'm only worrying about the text inputs at the moment. This seems to be working beautifully.
I then bind a button from the dialog to the forms submit() function. It returns the errors, as stated, and highlights the appropriate text fields, but quicktips is broken.
Any help would be appreciated!
Mason
I'm having an issue with quicktips. When my form is submitted and errors are returned, the icon doesn't appear next to the input element (though the red line does appear). When I hover over the input field, a slim div takes over the width of the screen, with the most left portion containing the icon and the error text.
The architecture of the application is as such:
The screen is split into north and center using the layout manager.
The center area contains two tabs. The tab in question loads an iframe. This was a workaround because I couldn't get loadScripts to work with a ContentPanel.
Inside this iframe is a full HTML declaration, complete with its own copy of extjs. It has a center/east fixed layout. The center layout contains a gridview, and the right column contains a few buttons.
Clicking on the button brings up my LayoutDialog. This dialog has one tab. Its source is loaded via an XHR call. It returns basic form HTML.
This basic form HTML is then transformed using the following code:
Form : {
Convert : function(form_id, save_url) {
var retForm = new Ext.form.BasicForm(form_id, {url: save_url});
var frm = Ext.get(form_id);
var form_elts = frm.dom.elements;
var processed = new Object();
for(elt in form_elts) {
var current_elt = null;
if(form_elts.item(elt) instanceof HTMLInputElement && typeof processed[elt] == 'undefined')
{
var type = form_elts.item(elt).getAttribute("type");
switch(type){
case 'text':
current_elt = new Ext.form.TextField();
current_elt.id = form_elts.item(elt).getAttribute('id');
processed[elt] = true;
break;
}
}
if(current_elt)
{
retForm.add(current_elt);
}
}
retForm.render();
return retForm;
}
}
As you can see, I'm only worrying about the text inputs at the moment. This seems to be working beautifully.
I then bind a button from the dialog to the forms submit() function. It returns the errors, as stated, and highlights the appropriate text fields, but quicktips is broken.
Any help would be appreciated!
Mason