Posted By Chuck on 11/09/2010 2:58 PM
I have noticed when I set my question fields to Read Only, in Internet Explorer 8, it sets the Font Color to a grayed out (embossed style) setting. I thought I could go to the DF style sheet and customize the font color of the Read Only box.
In that section, here is where I define the style:
.DynamicForms_DisabledTextBox
{
background-color: #D3D3D3;
font-weight: Normal;
font-size: 9pt;
color: #000000;
font-family: Tahoma, Arial, Helvetica;
text-decoration: none;
}
In I.E, it has no effect. But in Firefox, I can see the actual color that I set per my style sheet. Is there a way around this in I.E. 8
Thoughts?
It appears that in DF, one of the options that is used in the setup of textbox which is "READ ONLY", it adds another setting to the element. When I view the source, I see this added
disabled="disabled"
e.g.
<'input' name="dnn$ctr478$DynamicForms$TBR_GUID2399ecd8-1381-4929-a695-da4a8b34b311L11" type="text" value="0" maxlength="50" id="dnn_ctr478_DynamicForms_TBR_GUID2399ecd8-1381-4929-a695-da4a8b34b311L11"
disabled="disabled" class="total_DisabledTextBox" style="width:200px;" />
This makes the element in I.E. to disable the text box and renders any color properties set using the class css, useless and in I.E. the color looks grayed out.
To get around this issue, I created the textbox not using the "READ ONLY" setting. Then in my INITIAL JAVASCRIPT box, I identify my text boxes and call a function in my JAVASCRIPT FILE.
e.g
Initial Javascript:
var field1 = $(L11_FieldID);
setReadOnly(field1);
Javascript File:
function setReadOnly(passField){
document.getElementById(passField).setAttribute('readOnly', 'readOnly');
}
This way when the form is initially loaded or does a postback, it sets any QUESTION to have a "READ ONLY" attribute.
NOTE: There is a bug in this solution. If in your
MODULE CONFIGURATION | AJAX/JQUERY INTEGRATION |
FORM PROCESSING / SUBMISSION AJAX setting other than
DISABLED, it will make your QUESTION to lose the "READ ONLY" attribute to the field. It does not cause the form to do a POSTBACK. So make sure the setting is set to
DISABLED.
Chad, do you know around this, in regards of the AJAX setting?
-Chuck