robert.access Posted May 31, 2010 Share Posted May 31, 2010 Hi all! I have the following script: var persistclose=1 var startX=3 var startY=0 var verticalpos="fromtop" function iecompattest() {return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body} function get_cookie(Name) {var search=Name+"=" var returnvalue="";if(document.cookie.length>0) {offset=document.cookie.indexOf(search) if(offset!=-1) {offset+=search.length end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;returnvalue=unescape(document.cookie.substring(offset,end))}} return returnvalue;} function closebar() {if(persistclose) document.cookie="remainclosed=1" document.getElementById("topbar").style.visibility="hidden"} function staticbar() {barheight=document.getElementById("topbar").offsetHeight var ns=(navigator.appName.indexOf("Netscape")!=-1)||window.opera;var d=document;function ml(id) {var el=d.getElementById(id);if(!persistclose||persistclose&&get_cookie("remainclosed")=="") el.style.visibility="visible" if(d.layers)el.style=el;el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};el.x=startX;if(verticalpos=="fromtop") el.y=startY;else {el.y=ns?pageYOffset+innerHeight:iecompattest().scrollTop+iecompattest().clientHeight;el.y-=startY;} return el;} window.stayTopLeft=function() {if(verticalpos=="fromtop") {var pY=ns?pageYOffset:iecompattest().scrollTop;ftlObj.y+=(pY+startY-ftlObj.y)/8;} else {var pY=ns?pageYOffset+innerHeight-barheight:iecompattest().scrollTop+iecompattest().clientHeight-barheight;ftlObj.y+=(pY-startY-ftlObj.y)/8;} ftlObj.sP(ftlObj.x,ftlObj.y);setTimeout("stayTopLeft()",10);} ftlObj=ml("topbar");stayTopLeft();} if(window.addEventListener) window.addEventListener("load",staticbar,false) else if(window.attachEvent) window.attachEvent("onload",staticbar) else if(document.getElementById) window.onload=staticbar This script make a popup and I have modified css to look like an information bar that resize on top. The problem is that the bar it's comming from top in a sec and when i move the page down and after I move fast up the bar is "coming" to top. I want to be fixed on top like internet infobar and to stay on top of othe items and in top of the webpage when I move page up and down. Thanks alot in advance for any help and suggestions! Quote Link to comment Share on other sites More sharing options...
Adam Posted June 1, 2010 Share Posted June 1, 2010 The problem is that the bar it's comming from top in a sec and when i move the page down and after I move fast up the bar is "coming" to top. Apologies if English is not your first language, but I couldn't understand a word of that. I want to be fixed on top like internet infobar and to stay on top of othe items and in top of the webpage when I move page up and down. Sounds like you're wanting the work done for you? Maybe you should be posting this on the freelance board. Quote Link to comment Share on other sites More sharing options...
robert.access Posted June 1, 2010 Author Share Posted June 1, 2010 the bar it's appear from top and it's not fixed on top, I mean it's sliding down in a second. It's not fixed (what I want). and I just want an opinion or a simple code, mabe an ideea to change if(verticalpos=="fromtop") I dont think that it's so hard, but I really dont know java... MrAdam, thanks for the freelance suggestion... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.