+ Start a Discussion
ShravanKumarBagamShravanKumarBagam 

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

Hi

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!

 

Anup