|
-
Jun 26th, 2000, 09:52 PM
#1
Thread Starter
Addicted Member
Ok here is what I have. I have a script, that I think should work, but it doesn't. What it is supposed to do is check the document title and compare it to a string. If the title doesn't match the string then it is supposed to load a certian fixed background onto the page. The syntax should be right, I don't recieve any errors at least. This script also goes at the end of the page so it will be the last thing read in. Evently, assuming that I get it to work the webserver will send it as a footer so that all the pages, unless the page title is changed will use one background. So let me know if you can see anything wrong, it would be much appreciated.
if (document.title != "adminapproved")
{
document.background = "www.someaddress.com/backgrounds/webbackground.jpg";
document.bgProperties = "fixed";
}
Jeremy 
-
Jun 26th, 2000, 10:31 PM
#2
Frenzied Member
try this
Code:
<HTML>
<SCRIPT LANGUAGE="JavaScript"><!--
if (document.title != "adminapproved")
{
document.write("<BODY background='http://sl00257/images/notebook.gif' bgProperties='fixed'>")
}else
{
document.write("<body>")
}
//--></SCRIPT>
</BODY>
</HTML>
-
Jun 27th, 2000, 12:16 AM
#3
Thread Starter
Addicted Member
-
Jun 27th, 2000, 12:56 AM
#4
Thread Starter
Addicted Member
I was wrong
The aforementioned code only works when there is not a background picture to start with. Does anyone have idea on how to replace a background, assuming there is one, on a webpage. The code proably will need to be a java script and will allways be at the very bottom of the page. The webserver will be sending the file as a footer, which works fine with posted code from above, not mine though, when there is not a background.
Jeremy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|