11 Replies Latest reply on Jun 6, 2013 6:07 AM by AmintaAdobe

    Tables in Edge?

    pmfr01 Level 2

      Hi there.

      Is there a way to do tables in Edge?... With the html tags, that is?

       

      pmfr

        • 1. Re: Tables in Edge?
          joel_pau Level 5

          Hi,

           

          This code will return a table:

           

          var myTable = '<table border="1">'

                   +'<tr>'

                   +'<th>Header 1</th>'

                   +'<th>Header 2</th>'

                   +'</tr>'

                   +'<tr>'

                   +'<td>row 1, cell 1</td>'

                   +'<td>row 1, cell 2</td>'

                   +'</tr>'

                   +'<tr>'

                   +'<td>row 2, cell 1</td>'

                   +'<td>row 2, cell 2</td>'

                   +'</tr>'

                   +'</table>';

                  

                   sym.$("Text").html(myTable);

          • 2. Re: Tables in Edge?
            resdesign Adobe Community Professional & MVP

            NIce, Joel!

            • 3. Re: Tables in Edge?
              pmfr01 Level 2

              I was doing it without setting a variable - sym.$('table_container_1').html('<table summary="My tabel"><thead align="center" valign="center"><tr><th>Header 1</></><tr><th>... - your method is much better.

              Thanx Joel!

               

              pmfr

              • 4. Re: Tables in Edge?
                joel_pau Level 5

                You can also format cells adding these lines after sym.$("Text").html(myTable):


                sym.$("th").css({"border-width":"2px", "padding":"1px", "text-align":"center", "background-color":"#355d48",

                                              "color":"#ffffff", "font":"bold 20px Tahoma, Geneva, sans-serif"});

                 

                sym.$("td").css({"border-width":"2px", "padding":"1px", "text-align":"left", "background-color":"#DEE8DC",

                                              "color":"#355d48", "font":"bold 18px Tahoma, Geneva, sans-serif"});

                 

                Or you can use classes:

                var myTable = '<table border="1">'

                         +'<tr>'

                         +'<th class="header">Header 1</th>'

                         +'<th class="header>Header 2</th>'

                         +'</tr>'

                         +'<tr>'

                         +'<td class="cell">row 1, cell 1</td>'

                         +'<td class="cell">row 1, cell 2</td>'

                         +'</tr>'

                         +'<tr>'

                         +'<td class="cell">row 2, cell 1</td>'

                         +'<td class="cell">row 2, cell 2</td>'

                         +'</tr>'

                         +'</table>';

                 

                sym.$("Text").html(myTable);

                 

                sym.$(".header").css({"border-width":"2px", "padding":"1px", "text-align":"center", "background-color":"#355d48",

                                                   "color":"#ffffff", "font":"bold 20px Tahoma, Geneva, sans-serif"});

                 

                sym.$(".cell").css({"border-width":"2px", "padding":"1px", "text-align":"left", "background-color":"#DEE8DC",

                                                  "color":"#355d48", "font":"bold 18px Tahoma, Geneva, sans-serif"});

                • 5. Re: Tables in Edge?
                  pmfr01 Level 2

                  Awesome.

                  Thanx again Joel.

                   

                  pmfr

                  • 6. Re: Tables in Edge?
                    Lloydie73 Level 1

                    Hi Joel,

                     

                    this makes sense, albeit time-consuming in reformatting. so then with this code, declare it where? inside the sybol where one would want the table? on the stage? composition?

                    • 7. Re: Tables in Edge?
                      joel_pau Level 5

                      Hi Lloydie73,

                       

                      If you declare correctly, you can script your table anywhere.

                      Well, you can upload your file using a private message.

                      I will look at your file.

                      See you soon.

                      • 8. Re: Tables in Edge?
                        Lloydie73 Level 1

                        thank you Joel - you're well-worded response got me thinking the correct way!

                         

                        regards,

                        • 9. Re: Tables in Edge?
                          AmintaAdobe Level 1

                          Hi Joel!

                           

                          Welcome back! I've sent you a pm in march about dinamically update the content of a tabel in AE, did you read it?

                           

                           

                          Thanks!

                           

                          Davide

                          • 10. Re: Tables in Edge?
                            joel_pau Level 5

                            Hi Davide,

                             

                            Could you resend me your message?

                            • 11. Re: Tables in Edge?
                              AmintaAdobe Level 1

                              Ok!