Solved

add script to file

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

11 Experts available now in Live!

Get 1:1 Help Now