Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Automatically fill the text box

Author  Topic 

vk18
Posting Yak Master

146 Posts

Posted - 2006-10-31 : 19:51:18
Hello Friends
I have two text boxes, if i fill the first text box value with date then second text box needs to be filled automatically with the first textbox value.
any idea on how to do this..?
Thx

mr_mist
Grunnio

1870 Posts

Posted - 2006-11-01 : 04:38:05
Use the javascript loss of focus method on the first text box, so when it goes out of focus any value in it can then be copied into the second box.



-------
Moo. :)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-01 : 09:32:34
blur()



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

vk18
Posting Yak Master

146 Posts

Posted - 2006-11-01 : 12:12:12
quote:
Originally posted by spirit1

blur()



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp




hi,
what does blur() do..?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-01 : 12:18:30
that is javascript's "loss of focus method" that "mr mist" had in mind



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

vk18
Posting Yak Master

146 Posts

Posted - 2006-11-01 : 13:27:33
quote:
Originally posted by spirit1

that is javascript's "loss of focus method" that "mr mist" had in mind



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp



Hi,

can you give me the code if you have any idea..?
Thx
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-01 : 13:35:25
something like:

<script language="javascript" type="tesomething like:xt/javascript">
function SetTextBox2Value(textBox1Value)
{
document.getElementById('textBox2').value = textBox1Value;
}
</script>

<input type="text" id="textBox1" name="textBox1" onchange="SetTextBox2Value(this.value)"></input>
<input type="text" id="textBox2" name="textBox2"></input>






Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -