Jump to content

Recommended Posts

HI i dont know if its a stupid question but im so new to php you can forgive  me

well the thing is i have 3 text fields

 

textfield1

textfield2

textfield3

 

I want to add textfield 1 with textfield 2 and display it in a hidden textfield3 with a space between the text.

 

Textfield1(Sam) + Textfield2(Yam) = Textfield3 (Sam Yam)

thanks in advance

<script language="javascript">

function mearge(){

document.getElementById('a3').value =document.getElementById('a1').value + "  " +document.getElementById('a2').value ;

}

</script>

<form name="a" method="post" action="test.php">

<input type="text" name="a1" id="a1"/>

<input type="text" name="a2" id="a2"/>

<input type="text" name="a3" id="a3"/>

 

<input type="button" name="a11" id="a11" onclick="javascript:mearge();"/>

</form>

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.