HTML problem (floating menu)
iWebBuddy.com - Website Design and Web Development Forum :: Web Design and Development :: Markup Languages and Styling
Page 1 of 1 • Share •
HTML problem (floating menu)
- Code:
#topbar{
position:absolute;
border: 1px solid black;
padding: 2px;
background-color: black;
width: 87px;
visibility: hidden;
z-index: 100;
}
/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"
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.left=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
[url=http://www.iwebbuddy.com/]
href="" onClick="closebar(); return false"><img>
src="http://img.photobucket.com/albums/v328/stardragon588/x.jpg"
border="0" />[/url]
[color=white]
border="1">[table][tr][/tr][tr]Home
Portal Members Groups
colspan="2">Navigation
Bar[/tr][tr][td]Text
Here[/td][td]Other
Text[/td][/tr][/table][/color]
That code doesn't seem to work on my forum...any tips?

whatif- iWebBuddy Novice

Posts: 108
iCoins: 139
Re: HTML problem (floating menu)
Hello,
It doesn't work for me as well,
But, I've found a great script that does work,
All that you have to do now is edit links, ect...
Enjoy,
It doesn't work for me as well,
But, I've found a great script that does work,
- Code:
<script>
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer id="divStayTopLeft">
<!--EDIT BELOW CODE TO YOUR OWN MENU-->
<table border="1" width="130" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#0000FF">
<p align="center"><b><font size="4">My Menu</font></b></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<p align="left"> <a href="http://www.iwebbuddy.com">Hello</a><br>
<a href="http://www.iwebbuddy.com/">Hello</a><br>
<a href="http://www.iwebbuddy.com/">Hello</a><br>
<a href="http://www.iwebbuddy.com/">Hello</a><br>
<a href="http://www.iwebbuddy.com/">Hello</a></td>
</tr>
</table>
<!--END OF EDIT-->
</layer>
<script type="text/javascript">
/*
Floating Menu script- Roy Whittle (http://www.javascript-fx.com/)
script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
//Enter "frombottom" or "fromtop"
var verticalpos="frombottom"
if (!document.layers)
document.write('</div>')
function JSFX_FloatTopDiv()
{
var startX = 3,
startY = 150;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>
All that you have to do now is edit links, ect...
Enjoy,



Marc- Administrator

Posts: 1119
iCoins: 2197
Forum Pet:

Re: HTML problem (floating menu)
If its supposed to go on my homepage message it didn't work.

whatif- iWebBuddy Novice

Posts: 108
iCoins: 139
Re: HTML problem (floating menu)
whatif wrote:If its supposed to go on my homepage message it didn't work.
Try it again, and view the bottom of your forum,
Am temporarily testing it out on this forum, you can view the index and scroll to the bottom,



Marc- Administrator

Posts: 1119
iCoins: 2197
Forum Pet:

Re: HTML problem (floating menu)
I see it on the top, go on irregular and i will try it out 

whatif- iWebBuddy Novice

Posts: 108
iCoins: 139
Re: HTML problem (floating menu)
whatif wrote:I see it on the top, go on irregular and i will try it out
I viewed your source, and I seen something strange, that's not allowing it to work,
Try and remove every "code" tag you can find,
Example :
[cod e] [/ c o de]
Then, try it again,



Marc- Administrator

Posts: 1119
iCoins: 2197
Forum Pet:

Re: HTML problem (floating menu)
Theres no [code] in there. I used crl+f...I might be viewing the source..or is it my computer

whatif- iWebBuddy Novice

Posts: 108
iCoins: 139
Re: HTML problem (floating menu)
I have to go now,
When am back online, I'll try and find a solution to your problem,
Also, try searching everywhere you can, and see if there are any "code" html tags.
Example :
When am back online, I'll try and find a solution to your problem,
Also, try searching everywhere you can, and see if there are any "code" html tags.
Example :
- Code:
<cod e> </ co de>



Marc- Administrator

Posts: 1119
iCoins: 2197
Forum Pet:

Re: HTML problem (floating menu)
I've did some research, and this is a problem with your forum itself, 
It's not the code to create the floating menu,
You'll need to go to the forumotion's support forum for more assistance about this,
What's happening?
Extra code tags have been displayed in your source, making the scripts disabled, but displayed in code form.
I don't really know what's making this happen if your not doing it yourself,
Sorry,
It's not the code to create the floating menu,
You'll need to go to the forumotion's support forum for more assistance about this,

What's happening?
Extra code tags have been displayed in your source, making the scripts disabled, but displayed in code form.
I don't really know what's making this happen if your not doing it yourself,

Sorry,



Marc- Administrator

Posts: 1119
iCoins: 2197
Forum Pet:

Re: HTML problem (floating menu)
Marc wrote:I've did some research, and this is a problem with your forum itself,
It's not the code to create the floating menu,![]()
You'll need to go to the forumotion's support forum for more assistance about this,
What's happening?
Extra code tags have been displayed in your source, making the scripts disabled, but displayed in code form.
I don't really know what's making this happen if your not doing it yourself,
Sorry,
Thanks for trying marc

whatif- iWebBuddy Novice

Posts: 108
iCoins: 139
Permissions of this forum:
You cannot reply to topics in this forum












