Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Navigation Menu Advice needed.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Navigation Menu Advice needed.

 Post Reply Post Reply Page  <1234>
Author
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2003 at 11:30am

Add this to the head of your website

 

<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>

<script language="JavaScript1.2" fptype="dynamicanimation">

<!--
 // See KB article about changing this dynamic HTML
 dynamicanimAttr = "dynamicanimation"
 animCancel = "skipanim"
 fpanimationPrefix = "fpAnim"
 animateElements = new Array()
 currentElement = 0
 speed = 1
 stepsZoom = 8
 stepsWord = 8
 stepsFly = 17
 stepsSpiral = 16
 stepsSpiralWord = 19
 stepsElastic = 32
 steps = stepsZoom
 step = 0
 cornerPhase=0
 outEffect=0
 function remSuffix(str)
 {
  ind=str.indexOf("FP")
  str = str.substring(0,ind)
  return str
 }
 function dynAnimOut(el)
 {
  outEffect=1
  dynAnimation(el)
  outEffect=0
 }
 function dynAnimation(obj)
 {  
  animateElements = new Array()
  var ms = navigator.appVersion.indexOf("MSIE")
  var macness = navigator.appVersion.indexOf("Macintosh")

  ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
  ns6 = false
  if(!ie4)
  {
   if((navigator.appName == "Netscape") &&
    (parseInt(navigator.appVersion.subst ring(0, 1)) >= 5))
   {
    ns6=true
    doc_els=document.getElementsByTagNam e('*')
   }
   else if((navigator.appName == "Netscape") &&
    (parseInt(navigator.appVersion.subst ring(0, 1)) == 4))
   {
    doc_els=document.layers
   }
   else
    return
  }
  else
   doc_els=document.all
        if(outEffect && !ie4)
             return
  if(ie4)
  {
      for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
   {
    el = document.all[index]
    if(outEffect && el != obj)
     continue
    if(outEffect)
     animationId = el.id.substring(9,el.id.length)
    else
     animationId = el.id.substring(6,el.id.length)
    animation=remSuffix(animationId)
    if(null != animation)
    {
     altcnt=0
     if( animation == "dropWord"    ||
      animation == "flyTopRightWord"   ||
      animation == "flyBottomRightWord"  ||
      animation == "waveWords"   ||
      animation == "hopWords")
     {
      ih = el.innerHTML
      outString = ""
      i1 = 0
      iend = ih.length
      while(true)
      {
       i2 = startWord(ih, i1)
       if(i2 == -1)
       i2 = iend
       outWord(ih, i1, i2, false, "", outEffect ? obj.id : el.id)
       if(i2 == iend)
        break
       i1 = i2
       i2 = endWord(ih, i1)
       if(i2 == -1)
        i2 = iend
       if (animation == "waveWords")
        outWordAlt(i h, i1, i2, true, animation, altcnt)
       else
        outWord(ih, i1, i2, true, (outEffect ? "Out" : "") + animation,
         outEff ect ?  obj.id : el.id)

       if(i2 == iend)
        break
       i1 = i2
       altcnt++
      }
      document.all[index].innerHTML = outString
      document.all[index].style.posLeft = 0
      document.all[index].setAttribute(animCancel, true)
      document.all[index].style.visibility="visible"
     }
    }
   }
  }
  i = 0
  for (index=0; index < doc_els.length; index++)
  {
   el = doc_els[index]
   if(0 != el.id.indexOf(fpanimationPrefix))
    continue
   if (ie4)
   {
    elprops=el.style
    scrollOffsetTop=document.body.scroll Top
    docHeight=document.body.offsetHeight
    docWidth=document.body.offsetWidth
    elW=100
    elH=el.offsetHeight
   }
   else
   {
    scrollOffsetTop=window.pageYOffset
    docHeight=window.innerHeight
    docWidth=window.innerWidth
    if (ns6)
    {
     elprops=el.style
     elW=100
     elH=el.offsetHeight
    }
    else{
     elprops=el
     elW=el.clip.width
     elH=el.clip.height
    }
   }
   if(outEffect)
    animationId = el.id.substring(9,el.id.length)
   else
    animationId = el.id.substring(6,el.id.length)
   animation=remSuffix(animationId)
   if(outEffect && (obj != el))
   {
    if(el.SRCID != obj.id)
     continue
   }
   if (null != animation )
   {
    if(ie4 && null!=el.getAttribute(animCancel, false))
     continue
    if(!ie4)
    {
     elprops.posLeft=elprops.left
     elprops.posTop=elprops.top
    }
    el.startL=offsetLeft(el)
    if(animation == "f

Back to Top
Maxi View Drop Down
Groupie
Groupie


Joined: 24 October 2002
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maxi Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2003 at 8:36am

Hi God_Struth and Anthrax

Thanks so much for the help that I have recieved from both of you, it is really great that you both are kind enough to help me out here.

First of all Anthrax, thanks for your contribution with the Frontpage generated code. Unfortunately this code does not work for me because I am not running Frontpage Extensions on my Server. It works on my machine and I can see that it basically does the same as the code that God_Struth showed me. The advantage with the code that God_Struth gave me is that it seems that it is much shorter and does the same thing  

To God_Struth also a big thankyou for the code that you made for me, it does the job well and I am very happy with the script :-) However there is one small thing missing, and I hope that you may have some ideas on how to sort that out so that it functions the way that I am hoping for.

The problem is: Now I am able to higlight the whole cell as I wanted to, but unfortunately the hyperlink only works when the cursor is over the actual Hyperlink. (So if the cell is highlighted I cannot just click the mouse and be forwarded to the link like the navigation on this page). Do you have anyideas on how to make the whole highlighted area the link? That would make this little javascript complete;)

Hope to hear from you.

Kind Regards

Maxi

 

 

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2003 at 10:54am

im not sure about this, but you could try to place the a tag outside of the cell.. <a href="......." target="...."><td .........></td></a>

im not sure.. but you couldt try..

Back to Top
God_Struth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
Post Options Post Options   Thanks (0) Thanks(0)   Quote God_Struth Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2003 at 8:30pm
Sorry, didn't know the menu needed to stretch. Just add an onClick event like so:


<tr>
<td id="cell1" onMouseover="ON(1);" onMouseout="OFF(1);" onClick="link1.click();"><a href="default.asp"id="link1">cell 1</a></td>
</tr>
<tr>
<td id="cell2" onMouseover="ON(2);" onMouseout="OFF(2);" onClick="link2.click();"><a href="default.asp" id="link2">cell 2</a></td>
</tr>

etc..


You may need to add a cursor type to the menu class in your CSS file to get the hand to appear: { cursor: hand;}


Should be you now

Edited by God_Struth
"I'm only trying to help......"
Back to Top
Maxi View Drop Down
Groupie
Groupie


Joined: 24 October 2002
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maxi Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2003 at 9:34am

Hi God_Struth,

I just want to give you a BIG thankyou for all your help with the Javascript menu. It works great and it does exactly what I want it to do. Judging by the amount of READS to this post others have also been interested in this subject of Navigation.

I have successfully now made the "Head" part of the script an include on all the pages that I want the menues to be, and then I just include the table with the links where I want that.

Again thanks a million, your help has been so appreciated.

Also Anthrax thanks again for your help....it was great getting such quick feedback,suggestions and advice

Kind Regards

Maxi

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2003 at 4:40pm
sorry if this is not necessary but i was short on time (as you know maxi).... if you speak to me online later i can help as all the features you have stated.... are running on my menu bar ... if you send me a message (sms) i will come online and give you a hand if i can...
Back to Top
God_Struth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
Post Options Post Options   Thanks (0) Thanks(0)   Quote God_Struth Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2003 at 6:39pm
No problem Maxi, a pleasure to help you!

Glad its working the way you want it to, if you need any more help dont be shy in posting!
"I'm only trying to help......"
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2003 at 3:13am

ummm

if this is just to make a CELL highlight then why not just use

<style>
a.nav { color: #000000;}
a:hover.nav {color: #ff0000; background-color: #000000; disply: block; width: 100%; height: 100%;}
</style>

<a href="page" class="nav">text</a>

this was just a quick example so you could play around with colors and fonts etc

but it'd be alot better then half a mile of code ..... or is this not wot your after

hope it helps

Back to Top
 Post Reply Post Reply Page  <1234>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.