Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By ian
#58426 I've seen quite a lot of requests re 'how to insert data into a static/SPIFFS page?'
Often the advice is to split the page & serve it in sections. You really don't have to do this.

There is a family of javascript utilities to do it for you. The important one being 'W3-include-html'
See: http://www.w3schools.com/howto/howto_html_include.asp

I use this a lot & it works fine. Just make sure that your server responds appropriately to the request.
Look closely at this and you'll find the answer: http://www.w3schools.com/lib/w3data.js
Embed the js in your page & you're sorted.

I can't give you code (I use this as a challenge for students) but I'm happy to show it working.

Cheers

Ian
User avatar
By rudy
#58427
ian wrote:I've seen quite a lot of requests re 'how to insert data into a static/SPIFFS page?'
Often the advice is to split the page & serve it in sections. You really don't have to do this.


I didn't think so either. But I don't know enough to put together an example. But looking at the 2nd link you provided, I doubt I would want to figure all that out. (maybe)