Click here to Skip to main content
11,495,743 members (64,011 online)
Rate this: bad
good
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 at 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 at 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 at 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 at 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
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 275
3 RyanDev 230
4 Sergey Alexandrovich Kryukov 210
0 Sergey Alexandrovich Kryukov 10,362
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 3 Nov 2012
Copyright © CodeProject, 1999-2015
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