Jump to content

Echo value to a disabled text field


blepblep

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.

 

ReCdf.jpg

 

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 thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.