View Full Version : Easy/Quick Change Pages
Anayet
July 25th, 2001, 14:19
Is it possible to add some type of script or somthing so that you can enter a link to the script and edit the script.
The pages tha thave the link to the script will have the script effects.
For example, if you write some long html, and you insert it into the script, and then link the pages to the script, those pages will have the html, so when you want to edit the html, instead of editing every single page, you can just edit the script.
I saw one that was a vailable a while a go, which was a .js script, the only problem with that one was that you weren't allowed to use any spaces:(
Any Help Greately Appreciated.
Thanks In advance
Blizzy
July 25th, 2001, 16:46
you mean server side includes?
or make a javascript file behave like SSI?
meow
July 25th, 2001, 22:39
You mean something like this? Warning. This site is addictive. ;)
http://www.metababy.com/
Darin
July 25th, 2001, 23:43
How would you go about making JavaScript files act as SSI? And still keep .html as your extension, rather than .shtml. Any help would be greatly appreciated. I read something about it a while back on this forum, but don't remember it very clearly. So, I will say what I remember, and then please correct me where I'm wrong.
So, what I remember was that in order to make JavaScript files act as SSI, you have to add some sort of code (don't remember it) in your .htaccess file, which basically tells it to parse .js files. Is that right, if not please correct me where I mistaken.
Next, the thing I don't remember is how to call the JavaScript file. Do I use a SSI command? Such as... <!--#include virtual="menu.js" --> If not, how do I do it?
Also, what is the code I put in the .htaccess file? And do I just put HTML code in the JavaScript file, or do I have to add some sort of special lines of code before that. Thanks a lot in advance!! :)
Anayet
July 26th, 2001, 10:52
Whats the deal with Metababy?
Can I download it?:confused:
And by the way, what does Server Side Includes mean and do???
Thanks
Blizzy
July 26th, 2001, 11:22
its not purely SSI....
write a bunch of document.writeln("blahblahblah"); lines in a js file and encase them within a function. Call it where you need it in your html doc by typing in the usual <script language=javascript> functionName();</script>
problem is, if your browser doesn't have javascript enabled, things would look pretty ugly
Anayet
July 26th, 2001, 11:42
Blizzy, Thats the one that I described before, and its a headache, because you can't leave any spaces.
So if you want to use a page long html or more, and it has a lot of spaces, its gonna take a heck of a long time to remove the spaces:)
Are there any other ways people?
Thanks
jon787
July 26th, 2001, 12:26
As far as I know both PHP and ASP can do that kind of stuff. If you want to try that.
Anayet
July 26th, 2001, 12:34
I want to be able to do it to .html files.
Is this possible???
If so how and where do I get the stuff from?
Thanks
Anayet
July 28th, 2001, 12:51
Is there anything apart from .js files to do this???
Thanks
Anayet
July 28th, 2001, 13:34
Would it be possible to do the following:
If there were 5 pages called - Main.html, p1.html, p2.html, p3.html
Would it be possible to put HTML in just the Main.html page, and then put some kind of link in the pages p1.html, p2.html, p3.html
so that these pages use the html that is in the Main.html file?
So, if I wanted to make changes, instead of making changes to each page, I'd just change the Main.html file and the other pages would get the changes aswell as they'd have some kind of link.
Would this be possible????
Thanks
Anayet
lucifer
July 30th, 2001, 07:19
Anayet
when you say js won't let you use spaces what do you mean?
the best solution is php,asp,SSI
Anayet
July 30th, 2001, 08:21
I mean that, if I type in a code such as <b> </b>
It doesn't work because theres a space between the codes, it can only be <b></b>
This happens with the document.write command in .js
The page that I want this feature to be used on is a HTML page and can't be changed, but I only want to link the features to the HTML page, so if the page with the features on is a PHP, asp, page, the HTML page should have a link to the php, asp, pages to show the additional html.
Anybody understand what I'm saying?:D
Thanks
Anayet
lucifer
July 30th, 2001, 08:38
document.write("<B> </B>"); works no problem!
are you sure the problem isn't \n ie newlines?
Anayet
July 30th, 2001, 08:50
I deleted most of the script to test whether parts of it work, and I entered this as a test:
document.write('<a href="#." onclick="addtext('http://members.internettrash.com/anayet/lol.gif');return 0"><img border=0 src="http://members.internettrash.com/anayet/lol.gif" width="15" height="31"></a>');
And I still get errors.
Why?
lucifer
July 30th, 2001, 08:57
Originally posted by Anayet
I deleted most of the script to test whether parts of it work, and I entered this as a test:
document.write('<a href="#." onclick="addtext('http://members.internettrash.com/anayet/lol.gif');return 0"><img border=0 src="http://members.internettrash.com/anayet/lol.gif" width="15" height="31"></a>');
And I still get errors.
Why?
maybe try \' that may work else ' + "'" + '
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.