...

View Full Version : Text align not working JavaScript



angelali
11-03-2012, 04:13 PM
I want that when the user click on a button, the text align to the center.. This function of document.execCommand is supported to all browsers, but do not know if the syntax is correwct. Here the function below:


function centeralign() {
lol.document.execCommand('formatDoc', false, 'justifycenter');
};

Not sure what is wrong... Other document.execcomand functions are working well, except this one...alignment...

DanInMa
11-03-2012, 05:21 PM
nevermind im wrong. jsut been along time since ive seen anyone use it

angelali
11-03-2012, 06:07 PM
'justifycenter', false, null works



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum