The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
I've made two simple functions to hide / unhide divs based on what area of a page is moused over. They work fine when I shove the functions themselves in the page head, however, because it's in use with PHP, I only want the JS there if the $page variable is one of three pages... So I check for one of those pages, and if it's one of them I include the external JS files with the following code:
echo "";
echo "";
And this doesn't work... The echoed stuff is showing up (ie. nothing wrong with the PHP), the JavaScript functions just don't work... As if they're not being called...? Is there something I should know about calling JS functions from external JS sheets...?
Chars for any help!
Looks ok, if a bit like a powerpoint presentation.
I only found this out because I was messing around testing it though, and I know why it does that, but to fix it I'd need seperate js code for every page that uses the mouse overs, and the code would be much longer and more messy... Essentially I don't think the situation will really occur for people using the page normally (ie. not going out of their way to test and try and catch out the js code...) so I'm not going to bother fixing that slight glitch... I think it's fine as is.
> Whey!
>
> After much messing around and trying many things that might work,
> I've finally got it to work!
>
> :D
Despite my previous comments, I do quite like it. Well done it getting it working.
After much messing around and trying many things that might work, I've finally got it to work!
:D
I know that displaying content with JS is a bit dodgy, but I first built all these pages so on clicking the rollover links (they weren't rollovers at this point), the PHP takes you to index.php?page=(whatever)&sub=(subpage)
This means if you have js you can simply mouseover for the content, if not you can click the image for it and the PHP will display the correct content for that subpage...
Anyway, I have very little idea what's going on... I got rid of the div containing the rollover menu and centered the elements of it with padding... And now the scroll bar doesn't come up in FF! Which is good. However, now in IE the text in the rollovers isn't centered...
Confuzzling...
> you'd be better asking someone like m_m or
> Tyla.
Personlly, I have no comment. There's serious issues using this concept with things like accessibility & usability. Whay happens if you disable JS?
However... For some reason this seems to screw up the javascript even more... The divs just seem to appear at random places down the page with the body's height attribute set...
Very confusing...
body {
height: 101%;
}
The other two pages, one has 3 divs and another has... 7 or 8 I think... And this problem doesn't occur with FF on those pages... And the divs are just as tall or taller...
I can't see why this is happening... The scroll bar only appears on mousing over one of the elements that changes the page content...
Is there any way of forcing FF to have a crollbar even on a page that doesn't need it? If so I could just use that, and on mousing over the centered content wouldn't move...
I'm only guessing though - you'd be better asking someone like m_m or Tyla.