April 7, 200124 yr I want to edit marks of a student. on edit page teacher should edit only mark-1 and so the mark-2 should be the same with mark-1 ( without using script)The teacher is allowed to change only mark-1. He will not see the mark-2. when he presses on submit button mark-2 will be editted with the same value as mark-1. I used <input type hidden mark-2=mark-1> but mark-2 takes the previous value of the mark-1 Abkaplan
April 8, 200124 yr Author Yes at first it looks like that it can be done with calculations. but the mark-2 will be editted later buy using local scripts or will be editted individually ( for some reasons ). so it is not possible to use calculation. I can not put on the record detail page both mark-1 and mark-2 because users may input different values ( I can not rely on them ). The only thing I need one input field should go into two different fields as the same value. Or I will change it to calculation by using another field and comparision in my calculation according to another control field but that will make the program over load ( yes that will be small action but think about hundreds of calculation. I have to be away from calculation as much as possible ).And also am I right in thinking like that ? Abkaplan
April 8, 200124 yr It can be done with calcullation, but it will have to take into formula the edit date/time. From Web maybe the JavaScript can help.
April 9, 200124 yr Use a redirect page in between the form page and the results page. So the person submits the form, it goes to a second page that has a redirect url that edits the record just created and adds in the url mark-1=[fmp-field: mark-1]&mark-2=[fmp-field: mark-1]&-recid=[fmp-currentrecid]&-edit Make the format file the results page that you have now and voila, you have both fields filled with the same data Simon
April 11, 200124 yr ok.. just use a little javascript.. it will work wonders.. in the head of the document put this code.. code: <script> <!-- function sync() { document.FORMNAME["mark-2"].value = document.FORMNAME["mark-1"].value } //---> </script> then put an onSubmit event handler in your form tag <form name="FORMNAME" action="FMPRO" onSubmit="sync()"> you could also use and onChange or OnKeyUp event handler on the mark-1 text box, instead of the onSubmit in the form tag.. see which you like better on Chage would look like this <input name="mark-1" type="text" onChange="sync()"> and onKeyUp would look like this <input name="mark-1" type="text" onKeyUp="sync()"> this should work.. if it doesnt let me know i may have made the call to the form fields wrong.. i forget exactly how to do it when the tag name has non-standard charaters in it (such as a hyphen "-"). but it should work.. let me know.. also make sure to change FORMNAME to the name of your form [ April 10, 2001: Message edited by: bman ]
Create an account or sign in to comment