Solved

add script to file

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now