Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

Having problems capitalising text using javascript, script not working - code inside.

$
0
0

I've got a problem with a little a capitalisation script that is supposedly good that I copied from another source, the problem is I can't get it to work. I'm sure I am missing something vital here. Any suggestions would be greatly appreciated. 

----

String.prototype.capitalize = function() {
    return this.charAt(0).toUpperCase() + this.slice(1);
};

function capitalName() {
    var fullName = Xrm.Page.getAttribute("fullname").getValue();
    fullName.capitalize();
    Xrm.Page.getAttribute("fullname").setValue(fullName);
}






Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>