Wayne Barron
asked on
JQuery - Default innerhtml text with keyup function (copy as you type)
Hello All;
Working Code of Copy as your Type.
OK, what I want to do is have a default value at the beginning of the ChannelCode field.
Example
Testing-
So, everything you type into the Channel Field will be added to the end of the above-mentioned text.
If you type in: Something
You will get
Testing-Something
Thanks, All.
Carrzkiss
Working Code of Copy as your Type.
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type='text/javascript'>
$(document).ready(function () {
$('#Channel').keyup(function (e) {
var txtVal = $(this).val();
$('#ChannelCode').val(txtVal);
});
});
</script>
Channel ID : <input type=text" ID="Channel" Width="500" value=""><br />
<div style="height:10px;"></div>
Copy Code : <input type=text" ID="ChannelCode" ReadOnly ="true" Width="500" value="" /><br />
OK, what I want to do is have a default value at the beginning of the ChannelCode field.
Example
Testing-
So, everything you type into the Channel Field will be added to the end of the above-mentioned text.
If you type in: Something
You will get
Testing-Something
Thanks, All.
Carrzkiss
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER
And I did not try it the way you provided.
Thank you so much.
Something so simple.
You Rock!
Wayne