+ 1
Add file to functuon?
is there a way to call an external html file from a function and add it to the current file I'm on? I'm trying to create a forum/blog and and I'm thinking of having the input area (the input and where the input is displayed) in a separate html file so I can add a new one every time I cook a button without having all the input copied to the new form. Here's my code for a better look. https://code.sololearn.com/WX9B8dz563Ch/?ref=app
2 Answers
+ 2
Well that sucks lol I was hoping I'd be able to do it without having to use server-side, thanks anyway.
0
Welcome to serverside programming!
HTML unfortunately can't do it, javascript can't work with files either.
So you usually you do things like merging multiple "partial" HTML files on the serverside. Microsoft IIS + C#, XAMPP + PHP, node.js + javascript, ruby on rails, ... they all can do it, but it requires you to set up a webserver!