insert cells in runtime - Hebrew

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eitan

    insert cells in runtime - Hebrew

    Hello,
    In a table element
    How can I insert cell in their order (A, B, C, D ...) on javascript runtime,
    but see the cells inserted from right to left.
    I am doing :
    myTable.row(0). insertCell(0) // cell A
    myTable.row(0). insertCell(1) // cell B
    myTable.row(0). insertCell(2) // cell C

    What I want to see is the cells visible at the html in the order of :
    C , B, A.

    <TABLE dir = "rtl" .... />
    // What else should I write above

    Thanks :)


  • Evertjan.

    #2
    Re: insert cells in runtime - Hebrew

    Eitan wrote on 27 nov 2004 in microsoft.publi c.scripting.jsc ript:
    [color=blue]
    > Hello,
    > In a table element
    > How can I insert cell in their order (A, B, C, D ...) on javascript
    > runtime, but see the cells inserted from right to left.
    > I am doing :
    > myTable.row(0). insertCell(0) // cell A
    > myTable.row(0). insertCell(1) // cell B
    > myTable.row(0). insertCell(2) // cell C
    >
    > What I want to see is the cells visible at the html in the order of :
    > C , B, A.[/color]

    Call all thre with insertCell(0)

    =============== =======
    <table border=1>
    <tbody>
    <tr id=myTR></tr>
    </tbody>
    </table>



    <script type='text/javascript'>

    addTD("A")
    addTD("B")
    addTD("C")

    function addTD(text){
    newTD = document.getEle mentById("myTR" ).insertCell(0)
    newTD.appendChi ld(document.cre ateTextNode(tex t));
    }

    </script>

    =============== =======


    [color=blue]
    > <TABLE dir = "rtl" .... />[/color]

    I think that is only for strings ??


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress,
    but let us keep the discussions in the newsgroup)

    Comment

    Working...