chongkong
asked on
add script to file
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
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.
ASKER