I need a little help if someone has the time....
I am using a single PHP template and loading the content through the address bar. EX:
www.mysite.com/frameset.php?content=home would obviously display the home page.
Prior to using PHP I use to create multiple pages and the mouseovers were simple because they were all self contained in each file, so to get the effect I'm trying to do now is becoming near impossible with my limited PHP knowledge.
I am using a simple two image mouseover. I would like for the image corosponding to the page that is currently loaded to stay the mouseover image and the others to be the non-moused images.
Currently it's a mixture of java and php getting it all done, but I just keep seem to get the current page image to display the way I'm looking for it to.
The following is the code I'm using, more input to follow...
This is in the HEAD
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Pre-Download of images
image1 = new Image();
image1.src = "rj_link_home.jpg";
image2 = new Image();
image2.src = "rj_link_homems.jpg";
image7 = new Image();
image7.src = "rj_link_faq.jpg";
image8 = new Image();
image8.src = "rj_link_faqms.jpg";
image11 = new Image();
image11.src = "rj_link_about.jpg";
image12 = new Image();
image12.src = "rj_link_aboutms.jpg";
// End -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!-- Begin Mouse Over
function move_in(img_name,img_src) {
document[img_name].src=img_src;
}
function move_out(img_name,img_src) {
document[img_name].src=img_src;
}
// End -->
</SCRIPT>
That preloads the images and sets up the function for the mouseover.
Then the links look like this.
Code:
<A onmouseover="move_in('home','rj_link_home.jpg')" onmouseout="move_out('home','rj_link_homems.jpg')"
HREF="./frameset.php?content=home"><IMG NAME="home" ALT="Home Page" SRC="rj_link_home.jpg"
WIDTH="93" HEIGHT="31" BORDER="0"></A>
Ok, so all that is java and not PHP. I'll get to that shortly.
This has worked many years for multi-html pages, however, using PHP to load the content instead of having separate HTML pages now makes it so either I don't use a mouseover or all links have to be mouseover. In this code, I would like it that if $content=home then this image will be rj_link_home.jpg else image is rj_link_homems.jpg and will change to the other onmouseover.
I wouldn't mind converting to completely to PHP, but alas knowing what you want it to do and being able to format the code to do has been my downfall for many years.
There is one more problem with this code that you should be aware of. As of WinXP Service Pack 2 which just came out, there is even more security in MSIE that now prevents this code from functioning unless the user gives it permission to function. By default it will not function until the user clicks on this new warning bar that appears at the top of the page. It's quickly becoming a pain. I was hoping to be able to convert this to PHP with code that MSIE will not yell about. I'm not sure how many people here jumped on the next service pack, but you know many end users will be running it shortly.
Anyway, if anyone cares to lend a little hand with this it would be greatly appreciated.