Being a firm believer in SSI for ease of maintenance and flexibility, I came up with this problem.
I want to use Javascript to build a SSI call on the fly from the query string in the URL.
I know how to retrieve the query string, and write code into the HTML on the fly using Javascript, but all my efforts to write a SSI call with Javascript have been fruitless.
You can't do it with Javascript because its executed on the client AFTER the page is delivered. You need to build your SSI call before the page is delivered. Depending on your server setup you should have a couple of options available to you. You can use ASP, PHP or MivaScript if those engines are available to you. If not you can write a wrapper cgi script for your SSI. This script will process your URL and then call the appropriate SSI functions and insert them in your document.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
Thanks, I really hadn't thought thru the logic of it.
What I did do was write a CGI script to build the page on the fly (and it works), but it was a painful learning process, and I thought the other alternative would have been a lot cleaner.
Your welcome. I try to help as much as I can in these forums because I have learned a lot from them. Enough to enable me to develop a new business model for myself and change my development focus towards something that will be more enjoyable to me in the years to come.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
You can do some trick using invisible frames. You can load what you need it the invisible frame and the access it from your content frame with javascript.
Actually the CGI script that I wound up writing does the job quite well, including parsing the header file, loading images, parsing the description text file, parsing the footer file and building the page, all based on the query string in the URL.
Being CGI challenged, I was reluctant to tackle it, but it wasn't as bad as expected, and turned out well.
If anyone else has a need for this type of script, let me know.
Bookmarks