I've created a html page that basically is a way of controlling a user's use of a web application. The page allows the user to limit the uses to say 30 per month, or alternatively an unlimited amount.
So the page could consist of a html "input" text box, and a check box, where ticking the check box indicates unlimited use.
<div id="appUsageId"><input type="text" name="appUsage"></div>
So when the check box is ticked JS replaces the text above in the div tag with:
<div id="appUsageId"><input type="text" name="appUsage" DISABLED></div>
So when you untick, it reverts back. However my problem occurs when you tick on the box, then untick it, enter a value in the box and click submit. For some reason the "appUsage" parameter is not posted down to the servlet...
However if you don't tick the box ( so don't invoke JS ) then the value is posted down fine.
I honestly haven't a clue why this is happening. Does anybody have any ideas??
Any help you can give would be fantastic. Thanks a million
textBoxValue='<input type="text" name="appUsage" value ="0">';
textBoxValue='<input type="text" name="appUsage" DISABLED value ="Unlimited">';
document.getElementById("appUsageId").innerHTML = textBoxValue;