Question:
Updating static html page with JS?? (very simple CMS ?)?
Toby W
2008-05-30 06:02:40 UTC
Hi Guys,

Building a dinning website with static pages using CSS. There is one page however that will have to be updated once a month by a non-computer literate employee. It just has to show a menu copied from a word doc.

I dont want to use any .php CMS software, just a simple box they paste the menu into which then dumps the text into the correct DIV in the .html page?

Any ideas? could i do this with java-script or some other trickery?

Thanks in advance!
Three answers:
anonymous
2008-05-30 09:17:10 UTC
You can do this with AJAX, but I'd strongly encourage the menu be in plain text or HTML, not a word Doc. Word's formatting is horrible, bloated, and unpredictable, and even the "save as html" feature creates code that will likely cause problems with your existing site.



Here's an example:

http://www.aharrisbooks.net/xfd/book_8/chapter_4/csAJAX.html



Use 'view source' to see how it works. Note that I'm using the free jQuery library to simplify the AJAX call, and I've got several simple HTML stubs.



You might want to provide an online HTML editor for your user to create the stubs (so they think it's an online form of word but is saved in HTML format.)



Unfortunately, saving the file is one thing you won't be able to do without a server-side language (because of security limitations) so you'll need a way to get the file posted with the correct file name. If it's only once a month, this won't be too difficult.



Good Luck!
brandauer
2016-10-22 07:05:12 UTC
It sounds like you won't be able to provide the customers a "technical" answer, like utilizing ftp or some thing, and it sounds like you do not favor to flow by skill of the technique of transferring your web site to a CMS, it really is equipped for one of those case. hence you're searching at growing to be a custom answer. Tie the content cloth so as that it really is pulled from a database. provide the customers an safeguard web page, and let them positioned up your content cloth. also probably favor to grant them a decision to replace latest content cloth. All in all, you'll favor to create countless db tables and get dirty with some code.
The F
2008-05-30 06:12:09 UTC
you will have to implement a small CMS (login + text entry) in php or any other language to store the text on the server and insert it into the html.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...