Solved

add script to file

Posted on 1998-06-18
4
174 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTP Error 502.2 - Bad Gateway 3 222
Shell script to bind my job to half the number of vCPUs in Solaris 8 121
perl to convert excel to csv 3 253
Exchange 2010 Transport Rule Regex 28 119
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…

856 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