Jump to content

Echo value to a disabled text field


Recommended Posts

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.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.