J
|
Jane 12/1/2008 |
Hi, <script> document.forms.editform.value_FieldName.onchange=function() { if(this.options[this.selectedIndex].value=="no") document.forms.editform.value_FieldName.style.backgroundColor="red"; else document.forms.editform.value_FieldName.style.backgroundColor="white"; } </script>
|
B
|
bochaka author 12/1/2008 |
Many thanks. |
M
|
mengo 12/2/2008 |
Hi, use custom JavaScript code for this purpose. Here is a sample: To add JavaScript proceed to the Visual Editor tab, switch to HTML mode and add ode at the end of the page.
|
J
|
Jane 12/2/2008 |
Hi, <script> document.forms.editform.value_FieldName.onchange=function() { if(document.forms.editform.value_FieldName.value=="no") document.forms.editform.value_FieldName.style.backgroundColor="red"; else document.forms.editform.value_FieldName.style.backgroundColor="white"; } </script> |
M
|
mengo 12/3/2008 |
Hi, see my changes in Bold:
|
J
|
Jane 12/3/2008 |
Hi, |
M
|
mengo 12/5/2008 |
Hi, it's just a sample code. You need to replace field names with your actual ones. Also please make sure your field values are correct. Values are case-sensitive here. If it doesn't help publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages.
|
J
|
Jane 12/5/2008 |
Hi, if ($data["FieldName"]=="no") $row["rowstyle"]='style="background:blue"'; |
M
|
mengo 12/5/2008 |
Hi, this code is for add/edit pages. To change row background color on the list page use List page: After record processed event on the Events tab:
|