0
<table id="fishTable">
        <tr class="seperator">
            <th> Fingerlings </th>
            <th>15</th>
            <th>25</th>
            <th>50</th>
            <th>75</th>
            <th>100</th>
            <th>150</th>
            <th>200</th>
            <th>300</th>
            <th>500</th>
            <th> </th>
            <th>B.C.</th>
        </tr>
        <tr>
            <th id="RT">Red Tilapia</th>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td></td>
            <td>0</td>
        </tr>
  </table>

I need to be able to share this one table across multiple pages. I've tried adding it to local storage to keep track of the changes made on each individual page, but the problem is local storage is not shared between users nor devices. Any assistance y'all have would be very much appreciated...

EDIT: I don't believe it is possible (given the brief research I have completed thus far), but if I could have my JS application read/write to a .txt that is stored with it on a web-hosting application, that would work best. I know this can be done in Java, but I don't know how to easily interface the two...

EDIT #2: Ok, so I have a crazy, stupid idea, but I'm not entirely sure it'll work. I found a code snippet that allows me to read the RAW text from a GitHub file - which is exactly what I need! However, the next step is to be able to EDIT the file I'm reading, so that it appears the same everywhere. This is my problem. Is it possible (if so, how?) to write to a file/create new files in a GitHub repo from my external JS program (maybe run THROUGH CodeMirror)?

  • You didn't mention jQuery, but if it's possible, see [here](https://api.jquery.com/load/). – wazz May 30 '21 at 06:09
  • I'm trying to make this a very simple application - i.e. not using JQuery. – Chase Franse Jun 01 '21 at 16:17
  • 3
    @ChaseFranse doesn't sound like a very simple application if you want the table to be shared between all users and all devices (and keep it updated). You probably need a server-side as well to serve the table and keep the source-of-truth there or in a database... – Thatkookooguy Jun 01 '21 at 16:23
  • It's been a long time since I used JS for a project like this, but I say it's supposed to be simple because it would be in most other languages. Maybe it would be easier to create a Java Applet and host that in a HTML page (I still have NO idea how to do that - only that it is possible)... – Chase Franse Jun 01 '21 at 20:01
  • Your question, over the course of the edit markers, has morphed from being able to share a single table across multiple tables and multiple clients to introducing GitHub as a service possibly through CodeMirror. As such, it appears as though you're still in the design phase of this project and it is thus not ready to build, which is where Stack Overflow comes in; providing answers to practical programming problems. – Heretic Monkey Jun 01 '21 at 21:46
  • use firebase database and query/push to it – Shrey Joshi Jun 01 '21 at 22:04
  • I never heard about Firebase before - that looks like it may actually work! Thank you! – Chase Franse Jun 02 '21 at 13:42
  • @HereticMonkey: That's not true. I'm simply reeling and trying to find a solution because my original plan (and backup plan) don't work. The original question still stands, I've simply modified my potential options. – Chase Franse Jun 02 '21 at 13:43
  • If you're not writing code, Stack Overflow is unlikely to be the right place. You might look at the [help center](https://softwareengineering.stackexchange.com/help) at [softwareengineering.se] to see if your question is on topic there, but generally, most sites in the Stack Exchange network are not suitable for brainstorming sessions. – Heretic Monkey Jun 02 '21 at 14:02
  • I most certainly am writing code. I've been developing all the other features of this application for weeks - I just hit a roadblock with not being able to read files. This isn't a brainstorming session - I was asking for assistance with the code for accessing files with JS. Shrey Joshi appears to have helped me. – Chase Franse Jun 02 '21 at 15:20

0 Answers0