Solved

add script to file

Posted on 1998-06-18
4
166 Views
Last Modified: 2010-03-04
i would like to know how i can add a script to every page in my site like in geocities where the pop up window is added
0
Comment
Question by:chongkong
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
alamo earned 10 total points
ID: 1207894
I think they got rid of that, it was too annoying. Anyway, it was done with Javascript, not perl - they have set up their server so every page has their own header and footer html added, and in their footer (i think) they added javascript that popped up the new window.

0
 

Author Comment

by:chongkong
ID: 1207895
what i mean is how i can add the footer html to every page without typing it myself.
0
 
LVL 6

Expert Comment

by:alamo
ID: 1207896
The easiest way would be if your server supported it, turn it on as a server option. Next easiest would be to use server-side includes (or .asp), putting a line at the end of every document to include a common file (or run a script to generate the footer).

After that it gets tougher. If your footer changes periodically but not all the time, then the best way (because it doesn't need CGI) is a perl script that modifies all your pages to add the header. If you want the footer to be dynamic, then you would need to have all your pages served via a CGI. That would impact performance, so for any sort of heavy use you'd want to program the CGI in C or at least something other than perl. The CGI would get the file the user was requesting, and add the footer at the end.
0
 
LVL 6

Expert Comment

by:alamo
ID: 1207897
Next time please reject my answer if you don't like it, what you did was insulting and uncalled for on a 10 point question.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question