iWebBuddy.com - Website Design and Web Development Forum
Thanks for visiting iWebBuddy.com ,

If it is your first time here, please enjoy reading the tutorials and articles. If you can not find what you're looking for, then you can join the forums by registering so you will be able to log into the forums and ask for support for website development, request graphic designing services, promote your website, request website reviews, get advice from others about your website or be an active member of the community to help iWebBuddy.com grow.

After you register an account, you are required to log in. Once you log into your account, you will have more privileges. You will be able to post on the forums, send private messages and view the Chatbox ( link ) at the bottom of the forums.

Have a nice day.

HTML problem (floating menu)

Post new topic   This topic is locked: you cannot edit posts or make replies.

View previous topic View next topic Go down

Solved HTML problem (floating menu)

Post by whatif on Sun Nov 08, 2009 2:15 pm

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
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by Marc on Sun Nov 08, 2009 2:29 pm

Hello,

It doesn't work for me as well, Cry4

But, I've found a great script that does work, Wink

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, Very Happy







Marc
Administrator
Administrator

Posts Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

View user profile http://www.iwebbuddy.com

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by whatif on Sun Nov 08, 2009 3:42 pm

If its supposed to go on my homepage message it didn't work.

whatif
iWebBuddy Novice
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by Marc on Sun Nov 08, 2009 3:54 pm

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, Wink

Am temporarily testing it out on this forum, you can view the index and scroll to the bottom, Very Happy







Marc
Administrator
Administrator

Posts Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

View user profile http://www.iwebbuddy.com

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by whatif on Sun Nov 08, 2009 3:55 pm

I see it on the top, go on irregular and i will try it out Smile

whatif
iWebBuddy Novice
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by Marc on Sun Nov 08, 2009 3:59 pm

whatif wrote:I see it on the top, go on irregular and i will try it out Smile

I viewed your source, and I seen something strange, that's not allowing it to work, Wink

Try and remove every "code" tag you can find, greatwork

Example :
[cod e] [/ c o de]


Then, try it again, Very Happy







Marc
Administrator
Administrator

Posts Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

View user profile http://www.iwebbuddy.com

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by whatif on Sun Nov 08, 2009 4:02 pm

Theres no [code] in there. I used crl+f...I might be viewing the source..or is it my computer

whatif
iWebBuddy Novice
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by Marc on Sun Nov 08, 2009 4:12 pm

I have to go now, Cry4

When am back online, I'll try and find a solution to your problem, greatwork

Also, try searching everywhere you can, and see if there are any "code" html tags.

Example :
Code:
<cod e> </ co de>







Marc
Administrator
Administrator

Posts Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

View user profile http://www.iwebbuddy.com

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by whatif on Sun Nov 08, 2009 4:17 pm

Ok thank you Wink

whatif
iWebBuddy Novice
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by Marc on Sun Nov 08, 2009 7:04 pm

I've did some research, and this is a problem with your forum itself, Wink

It's not the code to create the floating menu, Cry4

You'll need to go to the forumotion's support forum for more assistance about this, greatwork

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, confused

Sorry, study







Marc
Administrator
Administrator

Posts Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

View user profile http://www.iwebbuddy.com

Back to top Go down

Solved Re: HTML problem (floating menu)

Post by whatif on Mon Nov 09, 2009 12:12 am

Marc wrote:I've did some research, and this is a problem with your forum itself, Wink

It's not the code to create the floating menu, Cry4

You'll need to go to the forumotion's support forum for more assistance about this, greatwork

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, confused

Sorry, study


Thanks for trying marc Smile

whatif
iWebBuddy Novice
iWebBuddy Novice

Posts Posts: 108
iCoins iCoins: 139

View user profile

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum