J
|
Jane 6/17/2008 |
Hi, {literal}<script> document.forms.editform.value_employment_approved.onchange=function() { if(document.forms.editform.value_employment_approved.value=='Yes') document.forms.editform.value_job_category.disabled=true; else document.forms.editform.value_job_category.disabled=false; } </script>{/literal}
|
D
|
dunga 6/24/2008 |
hi, Jane |
J
|
Jane 6/25/2008 |
Hi, {literal}<script> document.forms.editform.value_employment_approved.onchange=function() { if(document.forms.editform.value_employment_approved.value=='Yes') { document.forms.editform.value_fieldname1.disabled=true; document.forms.editform.value_fieldname2.disabled=true; document.forms.editform.value_fieldname3.disabled=true; } else { document.forms.editform.value_fieldname1.disabled=false; document.forms.editform.value_fieldname2.disabled=false; document.forms.editform.value_fieldname3.disabled=false; } } </script>{/literal} |
S
|
steveh 6/27/2008 |
Do you have an example of doing this in php using smarty rather than javascript? |
J
|
Jane 6/30/2008 |
No. PHP is executed on the server, JavaScript is executed on the client side. |
S
|
steveh 6/30/2008 |
Understand that, but if, before the page is displayed I want to change that field to read only (i.e. have it just as a display element rather than a field), is there a way to tell smarty to do this in the event before the page is displayed? |