The code below disables a textarea when trhe user has added the maximum rows it is allowed to add. The problem though is that lets say the user has added all the rows and the text area goes disabled, then if I click on the refresh button on the browser, then the textarea is still disabled, even though it should be enabled. So how can I get it so that if the user refreshes the page, then the textbox goes back to being enabled?
Below is code
if (qnum > <?php echo (int)@$_POST['textQuestion']; ?>) {
return;
$("#questionTextArea").attr("disabled", "disabled");
}
remove the
disabledattribute ondocument readythen afterwards if the use exceeds the max length it can be disabled and on page refresh it will be enabled again