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

how can i make text box required using javascript in vf page.


Baktash H.Baktash H.

set the visibility of the submit button to hidden until there is a value in the textbox.

i would use the onkeyup event to check if the textbox is filled or not.

Anup JadhavAnup Jadhav

Why would you want to do this using javascript? You can make it required by binding the value to a controller variable, and then making the VF page element by setting the required attribute to "true".


Hope this makes sense!