Confirm dialog with \t alignment

Discussion in 'Javascript' started by 00steve, Jan 10, 2008.

  1. 00steve

    00steve Guest

    Hi,
    I am using a confirm dialog to display a list of altered records when
    the user submits changes. I would like it displayed in the following
    format:


    Student Level Result
    --------------------------------------------------------------
    Test Student 21 4

    I know I can use \t for the spacing, but the thing is, for longer
    names, I am getting the level and result appearing an extra tab to the
    right. I have tried just padding the student name with empty spaces to
    a set length, but it would appear that some characters are wider than
    others, and as a result, the level and result are not alligned.

    Is there any way to have this confirm dialog formatted with horizontal
    allignment of the data?

    Thanks
    00steve, Jan 10, 2008
    #1
    1. Advertising

  2. 00steve

    Evertjan. Guest

    00steve wrote on 10 jan 2008 in comp.lang.javascript:

    > Hi,
    > I am using a confirm dialog to display a list of altered records when
    > the user submits changes. I would like it displayed in the following
    > format:
    >
    >
    > Student Level Result
    > --------------------------------------------------------------
    > Test Student 21 4
    >
    > I know I can use \t for the spacing, but the thing is, for longer
    > names, I am getting the level and result appearing an extra tab to the
    > right. I have tried just padding the student name with empty spaces to
    > a set length, but it would appear that some characters are wider than
    > others, and as a result, the level and result are not alligned.
    >
    > Is there any way to have this confirm dialog formatted with horizontal
    > allignment of the data?


    stipuleting you are takling browser output,
    your empty spaces way you need to use a font like Courier
    and use    

    use an html <table>

    BTW, what is your javascript Q?

    Show your minimal code perhaps.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 10, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Baker
    Replies:
    0
    Views:
    6,685
    Tony Baker
    Dec 17, 2003
  2. Patrick Delifer

    JS Confirm dialog from datagrid template column

    Patrick Delifer, Apr 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    683
    Patrick Delifer
    Apr 28, 2004
  3. =?Utf-8?B?VGFydW4gVXBhZGh5YXlh?=

    Problem showing confirm dialog on button webcontrol's onclick even

    =?Utf-8?B?VGFydW4gVXBhZGh5YXlh?=, Jun 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,531
    Peter Blum
    Jun 2, 2005
  4. ad

    How to show a confirm dialog?

    ad, Jun 4, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    762
  5. =?Utf-8?B?UHJpeWE=?=

    confirm dialog , return value

    =?Utf-8?B?UHJpeWE=?=, Dec 26, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    969
    Teemu Keiski
    Dec 26, 2005
Loading...

Share This Page