Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I have one TextBox say txtBox1 followed by a DropdownList --ddl1 and another textBox2 below that.

Now the user types a name into textBox1 and then selects one Item from the dropdown list.Now if the selected dropdownItem's index is 2 I want to copy textBox1.Text to TextBox2.Text. other wise TextBox2.text is to be cleared.

 

Can some one urgently help me with a javascript function to do this ?

Iam using asp.net with VB.net coding

:( :( :(

Edited by sureshcd10
ima
Posted

I solved the problem by using the folloing Javascript function

 

Thank u all I solved the problem by using the folloing Javascript function

 

 

<script language="javascript">

<!--

function ddlChangeFunction() {

 

if(document.Form1.cboRelationship.value == 1)

{

 

document.Form1.txtPatientFName.value=document.Form1.txtApplicantFName.value;

document.Form1.txtPatientLName.value=document.Form1.txtApplicantLName.value;

}

else

{

document.Form1.txtPatientFName.value="";

document.Form1.txtPatientLName.value="";

}

}

//-->

 

</script>

 

 

Than u alll...

ima

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.   Paste as plain text instead

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