I'm seeing some things that just don't look right in that code. For example the query to get the total records is not using the WHERE parameter to get the correct record total based upon the filter...
If you have access to a server-side language (such as PHP) you could build a javascript enabled "editor" that allows the user to "create" the image in JavaScript which then uses AJAX to send the data...
Because, the prompt != the value. The function IS using the value. I am trying to create functionality as seen in many input fields in other applications where a field will have text displayed in...
You will need to post the form you are using so we cn provide a script that will work with it. Any script will depend upon the filed names you are using.
I'm not clear from your post if you want to allow decimals or not. If you do you can use the built in isNaN() function. If the number must be a positive number, then add some addtional functionality...
Are you using server-side code to populate field 1 when the page is submitted? If so, you can just run the same code you have for disabling/enabling field2 and just run it onload.
Dang. I thought you had asked to hide columns (which is more difficult) so I wrote code to do that. Oh well, I added additional code to hide a row and left the column code in as well:
He did say this was homework. You would have done him a better service by not giving him the entire solution, just point him in the right direction, such as "take a look at the modulator operator"
There is a problem with using CSS to transform text in a form field. It only changes how the text is displayed in the form field. It does not change the actual text submitted in the form.
I'm not clear on the issue. When the user selects to "Save" the changes the page is submitted. You state that the back-end script is successfully updating the value in the database.