SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Drop in bounce prob JS
-
Feb 14, 2007, 02:49 #1
Drop in bounce prob JS
Hi guys
I have a javascript here I have tried to paste into my page. Im not overly familair with js, but this doesnt seem to be working. I have allocated each section to its position but the form just shows up and doesnt fly in and bounce.
I am not running any other script on the site and have used the exact same code on other pages and has worked fine.
Here is the code (have taken out form)
<script language=javascript src=DropPopOver.js></script><script language=javascript>
var ie=document.all
var dom = document.getElementById
var ns4 = document.layers
var bouncelimit = 32
var direction = "up"
function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top = scroll_top - 250
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart = setInterval("dropin()", 50)
}
function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top = parseInt(crossobj.top) + 40
else{
clearInterval (dropstart)
bouncestart = setInterval("bouncein()", 50)
}
}
function bouncein(){
crossobj.top = parseInt(crossobj.top) - bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit = bouncelimit * -1
if (bouncelimit==0){
clearInterval (bouncestart)
}
}
function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility = "hidden"
}
INSIDE BODY TAG
onLoad="setTimeout('initbox()',4000);"
BELOW BODY TAG
<div id="dropin" style="position: absolute; visibility: hidden;
left: 100;
top: 100;
width: 505;
height: 380;
border: 2px dotted #400000;
background-color: #FFFFFF"
<div contents / tables go here>
ThanksWeb Graphics Expert:
E-Covers, Ministes, Web Graphics for Marketers!
-
Feb 14, 2007, 03:59 #2
- Join Date
- Jul 2004
- Location
- Isle of Dogs
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
<script language=javascript src=DropPopOver.js>
This reference to an external javascript file DropPopOver.js is can it find the file ?Server Monitoring Dashboard - Status2K
-
Feb 14, 2007, 05:03 #3
thanks.. i did have that script in the page and also the external js in the directory, so i dont know if that was an issue..
Web Graphics Expert:
E-Covers, Ministes, Web Graphics for Marketers!
-
Feb 14, 2007, 15:56 #4
still have not resolved the issue - anyone?
Web Graphics Expert:
E-Covers, Ministes, Web Graphics for Marketers!
Bookmarks