blepblep Posted June 12, 2012 Share Posted June 12, 2012 Hi, I'm hoping could I get some help here please. I've included a screenshot hopefully it will make it clearer as what I'm trying to do. What I am trying to do is, see where it says John Doe in the text field beside Sign Off. I am trying to get it so when the user enters a name in the text field beside Sign Off and then clicks Sign Off, it will echo what the user enters to the disabled text field beside the Minutes of Meeting. Here is my code for the Minutes of Meeting text and field - <input type = \"text\" name = \"signOff\" id = \"signOff\" size = \"20\" readonly = \"readonly\" style = \"float:right\" value = \"" . $signOffName . "\" onclick = \"updateSignOff();\"/> <b>Minutes of Meeting</b></td> Code for updateSignOff() function updateSignOff() { document.forms[0]["signOffName"].value = document.forms[0]["signOff"].value; } Code for Sign Off button - <input type = \"text\" name = \"signOff\" size = \"24\" align = \"right\" value = \"" . $row['signOff'] . "\"/> <input type=\"submit\" name=\"save\" class = 'eBtnSubmit' value=\"Sign off\" align = \"right\" /> I'm sure my code above is not correct/conflicting but am I right in saying I need to give the text field beside Minutes of Meeting an ID, then in my JavaScript send the text that was entered in the text field beside Sign Off to the field beside the Minutes of Meeting? Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/264040-echo-value-to-a-disabled-text-field/ Share on other sites More sharing options...
blepblep Posted June 12, 2012 Author Share Posted June 12, 2012 I think I may be able to use jQuery's change function but I'm unsure of how to do it when the user clicks the Sign Off button. Anyone able to help? Quote Link to comment https://forums.phpfreaks.com/topic/264040-echo-value-to-a-disabled-text-field/#findComment-1353117 Share on other sites More sharing options...
blepblep Posted June 12, 2012 Author Share Posted June 12, 2012 This can be solved, I fixed it. Quote Link to comment https://forums.phpfreaks.com/topic/264040-echo-value-to-a-disabled-text-field/#findComment-1353135 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.