...

View Full Version : dot behind characters



docock
12-10-2007, 03:33 PM
Hi, Is there a way to place a dot behind every alphabetic character in a textfield? For example if someone enters 'LJPM' I want it too become 'L.J.P.M.'

Which coding can I use for this?

Philip M
12-10-2007, 04:40 PM
<form name = "myform">
<input type = "text" name = "thisField" size = "40" onchange = "addDots(this)">
</form>

<script type = "text/javascript">
function addDots(which) {
var dotsAdded = which.value.replace(/([A-z])/g,"$1.");
alert (dotsAdded); // delete after testing
}

</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum