Hi I have a nice copy field script but I would like the copied phone number to have dashes in it so it reads better:
Here's the relevant code below. Can someone please tell me how to integrate adding dashes to the phone number field ONLY (NOT the entered field)?
I saw here ( a post how to make the dashes appear upon blur but it should be upon entry NOT blur into the copied field.
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(function(){
var $foo = $('#foo');
var $bar = $('#bar');
function onChange() {
$bar.val($foo.val());
};
$('#foo')
.change(onChange)
.keyup(onChange);
});
});//]]>
</script>
<input id="foo" name="Phone1" size="10" maxlength="10" />
<input id="bar" style="background:none; border:none; color:#FFFFFF; font-weight:bold; font-size:13px; width:90px" size="10">
<a href=" Binary Options Signals System</a>
Here's the relevant code below. Can someone please tell me how to integrate adding dashes to the phone number field ONLY (NOT the entered field)?
I saw here ( a post how to make the dashes appear upon blur but it should be upon entry NOT blur into the copied field.
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(function(){
var $foo = $('#foo');
var $bar = $('#bar');
function onChange() {
$bar.val($foo.val());
};
$('#foo')
.change(onChange)
.keyup(onChange);
});
});//]]>
</script>
<input id="foo" name="Phone1" size="10" maxlength="10" />
<input id="bar" style="background:none; border:none; color:#FFFFFF; font-weight:bold; font-size:13px; width:90px" size="10">
<a href=" Binary Options Signals System</a>