Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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 correct. 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...
Posted
Comments
enhzflep 3-Nov-12 13:55pm    
What's 'lol'? Is it an iframe element?

1 solution

its the iframe name. i already found the answer...
 
Share this answer
 
Comments
enhzflep 3-Nov-12 16:47pm    
1) I asked you a question - the appropriate place to reply is in a comment.

2) You solved the question. MARK it as solved and move on. Would you have returned and said that you found an answer already if I didn't query you in the comments?

3) DO NOT add another solution. Edit the one that's here already..
enhzflep 4-Nov-12 3:59am    
Listen here you:

"Hey chill out damn it... Do your mouthy with others.. your game will not work with me.. either you help like a civilized person or go away and have some lollypop like kids..."

Appears to be a spectacularly hypocritical thing to have said, right before the question whose comments you wrote it in were deleted.


I offered you a suggestion and some observations. You came back with something that was unsubstantiated in both the links you provided (you didn't) and the code you supplied - it failed as I said it did.

I don't get paid to help, and I certainly don't appreciate blow-ins like you getting lippy when the advice offered to them isn't to their taste.

Grow up!
bunnyali2013 4-Nov-12 4:02am    
Blablablblablabla heyy macarenaaaaaaaa...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900