Click here to Skip to main content
12,079,489 members (62,925 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript
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 3-Nov-12 6:17am
Comments
enhzflep 3-Nov-12 13:55pm
   
What's 'lol'? Is it an iframe element?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

its the iframe name. i already found the answer...
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160212.1 | Last Updated 3 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100