function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NordbergNordberg 

JavaScript with Visual Force

Hello All,

I am realatively new to both JavaScript and VisualForce. I am looking to dynamically change the type of field within a page based on the value of another field.

For example

if document.getElementById('D1') = "1/1/1900" ... Then change document.getElementById('D1I1') from inputField type to outputField.

Does anyone know if this is possible, and if so can help me fill in the holes.

Thanks

JD
aalbertaalbert

My colleague Ryan Marples has a great blog post for enabling inline editing within Visualforce. This shows an example of how to switch between an input field and an output field.