In visualforce page ,I want to show hidden text2 field , if text1 field is not null in visualforce page.
3 Answers
1 way to achieve is:
step 1. on page load set style for text2 display :none
step 2. Write javascript on the event onchange/onblur of text1 and check text1 is not null then set style for text2 display:block
-
If you post a sample code, it would be helpful for the questioner to dive deeper. Commented Jun 5, 2015 at 8:14
Step 1: give class to text2 text1 input feild Step2: on page load $('.text1Class').hide(); if($('.text1Class').val() !='') { $('.text2Class').show(); }