alex B
05-02-2003, 02:59 PM
I have a small problem.
I do have a form that creates input field – “longitude”
That field is being passed to the server where it is being loaded into database. Page is reloads with the text field having that new value.
Also Page allows user to change value of that field by clicking on the small map above. On clicking it loads that new value in text field. Also value of text box can be changed manually by clearing and typing it. In both cases new values is being updated into database after submission.
Well here is the problem. When user clicks on the map and submits the form, page comes back with the new value in that text box just fine.
Yet, when user does changes it manually it updates database just fine, but comes back on the page with old values.
The problem here is that my code looks like this
….
<input value=’text’ name=’longitude’ value=’<%=backend_processing_for_this_page.longitude %>’>
I was thinking of writhing some javaScript ( onChange=someFunction(this) ) that will checks if value has been changed.
I need something like on Change of the field use javascript else do not use it.
I am not very good at JavaScript and was wondering if someone can help
I do have a form that creates input field – “longitude”
That field is being passed to the server where it is being loaded into database. Page is reloads with the text field having that new value.
Also Page allows user to change value of that field by clicking on the small map above. On clicking it loads that new value in text field. Also value of text box can be changed manually by clearing and typing it. In both cases new values is being updated into database after submission.
Well here is the problem. When user clicks on the map and submits the form, page comes back with the new value in that text box just fine.
Yet, when user does changes it manually it updates database just fine, but comes back on the page with old values.
The problem here is that my code looks like this
….
<input value=’text’ name=’longitude’ value=’<%=backend_processing_for_this_page.longitude %>’>
I was thinking of writhing some javaScript ( onChange=someFunction(this) ) that will checks if value has been changed.
I need something like on Change of the field use javascript else do not use it.
I am not very good at JavaScript and was wondering if someone can help