I have this site The Dandy Group and it has this javascript it automaticly inserts into the top of my page before the <HTML> tag and what the javascript does is displays this popup that pops under the page and then after like 10 seconds it pops over the page. Its the same thing for everyone of my pages and I have lots and lots of pages and I wanted to know if their was a php script out there that would automaticly insert a script at the top of my pages that would disable this popup. I don't want to have to go and insert a script that would do this on every single page so is thier a script that would automaticly do this like a php include or somthing? I'll post the code it inserts in the top of the page below.
You're not going to be able to disable JavaScript pop-ups with PHP or any other server side language. They're being automatically inserted by your host (I'm assuming you don't pay them). And since their added scripting is at the end of your page it can be done. Possibilities: start an HTML comment that you don't close; start a JavaScript comment you don't close; start a JavaScript statement that isn't complete. It'll cause errors on the page but it may stop the pop-ups.
Or have your own onload event that will automatically close the windows that are opened.
use CGI qw(:all);
use CGI qw(fatalsToBrowser);
use strict;
print header;
sub goto_404{
print<<DOCUMENT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>404 Page not found</title>
</head>
<body>
Your 404 message here
</body>
</html>
DOCUMENT
}
Server's do not statically modify HTML documents on the server. It is attached to whatever output is being sent to the client. In the case of a Perl script, whatever output it produces will be modified to include the server's script header and then passed to the client.
Bookmarks