•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,958 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,802 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 766 | Replies: 2 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
I have been working on a Wordpress theme for some time now. I got a javascript from the original website. I import it into the Wordpress header.php. But it does not work at all. No floating images as I move my mouse. Nothing at all. Firebug gives me this error:
On that line of the javascript you will find this:
I know very little about javascript, so I would appreciate your help. Maybe I need to change the code as I import it now instead of having it in the header =>index itself?
document.body has no properties http://www.xxx.xx/xxx/wp-content/themes/Verhoijsen2/float.js Line 2
var screenheight =document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
Last edited by rhand : May 14th, 2008 at 11:31 pm.
•
•
Join Date: May 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Well, I have got the images to float in IE7. I forgot to put the image folder in the root. :-). But every time an image leaves the screen, the screen enlarges until it has left :-( . The images now cover everything, so I still need to work on the z-index. I will work that out later.
The scroll bar issue is more pressing. If I add body {overflow:hidden;} it might be gone, but then I cannot scroll down the page anymore.
Furthermore, I still see nothing of the floating images in Firefox 2.0.0.14. I still get the error:
How come? Does anybody have an idea? I know I am getting close...
The scroll bar issue is more pressing. If I add body {overflow:hidden;} it might be gone, but then I cannot scroll down the page anymore.
Furthermore, I still see nothing of the floating images in Firefox 2.0.0.14. I still get the error:
document.body has no properties http://www.domain.xx/folder/wp-content/themes/Verhoijsen2/float.js Line 2
How come? Does anybody have an idea? I know I am getting close...
•
•
Join Date: May 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Well, I fixed the error in Firefox. Because the javascript was loaded before the body was formed it did not work. I added the javascript include snippet: in the footer. And yes now it loads!!!!
The final issue will be to resolve the ugly vertical and horizontal scroll bars showing up when an image is about to leave the screen. And make sure the images pass behind the content. Any final tips anybody? Some help on the scrolling issue especially would be great!!
<script type='text/javascript' src="<?php bloginfo('template_url'); ?>/float.js">The final issue will be to resolve the ugly vertical and horizontal scroll bars showing up when an image is about to leave the screen. And make sure the images pass behind the content. Any final tips anybody? Some help on the scrolling issue especially would be great!!
Last edited by rhand : May 15th, 2008 at 2:52 am. Reason: forgot a remaining issue
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: scrolling
- Next Thread: Field with UPPERCASE but without soecial characters


Linear Mode