Title: Javascript access to the table elements
Last modified: November 14, 2018

---

# Javascript access to the table elements

 *  Resolved [dpasserone](https://wordpress.org/support/users/dpasserone/)
 * (@dpasserone)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/)
 * Suppose that I use a table in a page (I am using the Enfold Child theme) and 
   I want to reproduce the values of some table elements in another page.
    How can
   I access these values in javascript, say the element (3,2) of the table “table
   id=15”, in any HTML or PHP script of the same website?
 * Thank you!
    Daniele
    -  This topic was modified 7 years, 7 months ago by [dpasserone](https://wordpress.org/support/users/dpasserone/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10881227)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * So, do you want JavaScript, HTML or PHP, that’s a bit of a difference here 😉
   
   Now, your best chance probably is to use the Single Cell Shortcode Extension,
   see [https://tablepress.org/extensions/table-cell-shortcode/](https://tablepress.org/extensions/table-cell-shortcode/)
   With that, you can show the content of a single table cell on a different page.
 * Regards,
    Tobias
 *  Thread Starter [dpasserone](https://wordpress.org/support/users/dpasserone/)
 * (@dpasserone)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10881260)
 * Well I am quite free about the choice. PResently I am using Contact Form 7 that
   allows to use HTML and so-called “Form Tags”
 * [https://contactform7.com/tag-syntax/](https://contactform7.com/tag-syntax/)
 * I never have investigated whether these tags can be replaced with “shortcodes”
   from TableCell…
 * What do you think?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10881279)
 * Hi,
 * so your actual goal here is to use values from table cells in such a contact 
   form?
    To be honest, I have no idea if and how that could be possible 🙁 I guess
   it really depends on where content for such form tags can come from, but I’m 
   the wrong person to ask that, sorry.
 * Regards,
    Tobias
 *  Thread Starter [dpasserone](https://wordpress.org/support/users/dpasserone/)
 * (@dpasserone)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10881281)
 * Well, you already pointed to the element extension — let’s see
    Thank you very
   much!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10881377)
 * Hi,
 * sure, no problem! I hope it helps! 🙂
 * Best wishes,
    Tobias
 *  Thread Starter [dpasserone](https://wordpress.org/support/users/dpasserone/)
 * (@dpasserone)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10882437)
 * Maybe a small extraquestion is:
    is the tablepress shortcode interpreted also
   in php scripts? I had the idea of including the shortcode directly here:
 * [https://gist.github.com/morgyface/56474f0a37abb7d622880daf6eff6e40](https://gist.github.com/morgyface/56474f0a37abb7d622880daf6eff6e40)
 * instead of getting elements from the post I plan to get the value from your shortcode.
   Would it work?
 * Thank you!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10883972)
 * Hi,
 * you could use it in PHP code with a trick, by wrapping it in the Shortcode evaluation
   function:
 *     ```
       $shortcode_value = do_shortcode( '[table-cell ... /]' );
       ```
   
 * Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Javascript access to the table elements’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/javascript-access-to-the-table-elements/#post-10883972)
 * Status: resolved