Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1

    Default Navbar mouse on/off issues

    I have searched and really haven't seen where anyone has asked this partricular question. I have created a simple text only navbar( 4 buttons/words ). I am going to describe it so there is no confusion about what I want to do so bear with me...

    Mouse off = white navbar background, white web site background, dark navbar letters( just the text shows on the site in mouse off )

    Mouse on/over = colored navbar background, white web site background, white navbar text( text displays in colored box when mouse on/over )

    Everything works fine, I don't have issues with links, having Webstyle work with my web design software, uploading items from this software to my host, etc.... The issue is related to the on/off status of the mouse over.

    The only option I seem able to come up with in Webstyle 4 with the navbar is it shows the page you are on as Mouse ON when you are on that page. My client does not want that( and frankly neither do I - looks awful ). I would like it so the only time the text/button highlights is when you actually put the pointer over it. Once the page you are linked to opens I want that option in the navbar to go back to Mouse OFF.

    The only way to this point I have been able to do that is to add a drop down menu with no text in it. However, this drops a small box down which goes over items on the page and that looks ridiculous.

    Is it possible in Webstyle to not have the navbar indicate a Mouse ON condition for the page you are on? If so how do I do this? If it is not possible then it should be taken care of so we have that option.

    The only time I want the Mouse on/over condition to come on is when the pointer is actually on the navbar text. I could do a simple text only hyperlink but #1 that puts lines under it and changes the text color and #2 the client likes the highlight box effect on mouse over( just not always on when on that page ).

    Thank you in advance for any help. The client is breathing down my neck and I just can't get this to work. I don't want to do this another way. I bought Webstyle to save me time and so far it has been great but this oversite( if it is an oversite )is very annoying.

  2. #2
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Navbar mouse on/off issues

    Hello Hsthunder,

    Welcome to Talkgraphics.

    Open the javascript file created by Webstyle 4 for your menu.

    Find the statement var selstate="_over" and change it to read var selstate="_off"

    That should make the selected state show the mouseoff button.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  3. #3

    Default Re: Navbar mouse on/off issues

    Quote Originally Posted by Soquili View Post
    Hello Hsthunder,

    Welcome to Talkgraphics.

    Open the javascript file created by Webstyle 4 for your menu.

    Find the statement var selstate="_over" and change it to read var selstate="_off"

    That should make the selected state show the mouseoff button.
    Thank you for the reply and the suggestion.

    I did as you said and it did remove the highlight from the box BUT it turned it into a white outlined box with a red X beside the text( as if it wasn't displaying a picture ).

    Came close. Not sure if this matters but the gif's for the off state do not have off after them. The gif's for when you mouse over say over after the file name but it does not say off after the regular ones???

    You know, an odd part of this is on my computer when I open the page file the navbar works as I want it to. It is only after it is uploaded that it starts to highlight the page it is on up top on the navbar.

    Here is the info from the js file. Maybe it will help figure this out. Thanks to anyone in advance who can help with this!

    //©Xara Ltd
    var clicked="";var gtype=".gif";var selstate="_over";if (typeof(loc)=="undefined" || loc==""){var loc="";if (document.body&&document.body.innerHTML){var tt=document.body.innerHTML;var ml=tt.match(/["']([^'"]*)navbar.js["']/i);if(ml && ml.length > 1) loc=ml[1];}}document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>");tr(false);writeButton("", "http://www.cheridennettstudio.com/index.html","navbar_b1",132,20," Home ","",0);writeButton("","http://www.cheridennettstudio.com/page2.html","navbar_b2",132,20,"Gallery","",0);wri teButton("","http://www.cheridennettstudio.com/page3.html","navbar_b3",132,20,"Updates","",0);wri teButton("","http://www.cheridennettstudio.com/page4.html","navbar_b4",132,20,"Contact","",0);tr( true);document.write("</tr></table>");loc="";function tr(b){}function turn_over(name) {if (document.images != null && clicked != name) {document[name].src = document[name+"_over"].src;}}function turn_off(name) {if (document.images != null && clicked != name) {document[name].src = document[name+"_off"].src;}}function reg(gname,name){if (document.images){document[name+"_off"] = new Image();document[name+"_off"].src = loc+gname+gtype;document[name+"_over"] = new Image();document[name+"_over"].src = loc+gname+"_over"+gtype;}}function evs(name){ return " onmouseover=\"turn_over('"+ name + "')\" onmouseout=\"turn_off('"+ name + "')\""}function writeButton(urld,url,name,w,h,alt,target,hsp){gnam e=name;while(typeof(document[name])!="undefined")name+="x";reg(gname,name);tr(true); document.write("<td>");if(alt!="")alt=" alt=\""+alt+"\"";if(target!="")target=" target=\""+target+"\"";if(w>0)w=" width=\""+w+"\"";else w="";if(h>0)h=" height=\""+h+"\"";else h="";var l=clicked!=""||!isCurrentFile(url);if(url!="")url= " href=\""+urld+url+"\"";if(l){if(typeof(clx)!="unde fined"){target="";url=" href=\"?"+clx+"\"";alt=" alt=\"Click to edit\"";}document.write("<a "+url+evs(name)+target+">");}else gname+=selstate;gname+=gtype;if(hsp==-1)hsp=" align=\"right\"";else if(hsp>0)hsp=" hspace=\""+hsp+"\"";else hsp="";document.write("<img src=\""+loc+gname+"\" name=\""+name+"\""+w+h+alt+hsp+" border=\"0\" />");if(l)document.write("</a>");document.write("</td>");tr(false);}function syncFile(f,nf){var matches='home.html*index.html*welcome.html*default .asp';var p=f.lastIndexOf('/');var sf=f;if(p>=0)sf=f.substr(p+1,f.length-1);if(matches.indexOf(sf)==-1)return "";return sf;}function isCurrentFile(str){var p=str.lastIndexOf(':');if(p>0)str=str.substr(p+1,s tr.length-1);str=escape(str);str=str.toLowerCase();while(str .length>3&&str.substring(0,3)=="../")str=str.substr(3,str.length-1);var fstr=str.indexOf(".htm");if(fstr==-1)fstr=str.indexOf(".asp");if(fstr==-1)fstr=str.indexOf(".php");if(fstr==-1)fstr=str.indexOf(".jsp");if(fstr==-1)fstr=str.indexOf(".txt");if(fstr<1&&str.charAt(s tr.length-1)!='/')str+="/";var current=document.location.href.toLowerCase();p=cur rent.lastIndexOf('?');if(p>0)current=current.subst r(0,p);var fcurrent=current.indexOf(".htm");if(fcurrent==-1)fcurrent=current.indexOf(".asp");if(fcurrent==-1)fcurrent=current.indexOf(".php");if(fcurrent==-1)fcurrent=current.indexOf(".jsp");if(fcurrent==-1)fcurrent=current.indexOf(".txt");if(fcurrent<1&& current.charAt(current.length-1)!='/')current+="/";if(fstr!=-1&&fcurrent==-1)current+=syncFile(str,current);if(fstr==-1&&fcurrent!=-1)str+=syncFile(current,str);var currsize=current.length;var strsize=str.length;while(strsize>=0&&currsize>=0){ if(current.charAt(currsize)!=str.charAt(strsize))r eturn false;currsize=currsize-1;strsize=strsize-1;}return true;}
    Last edited by gsthunder; 15 July 2009 at 01:15 AM.

  4. #4
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Navbar mouse on/off issues

    Hello again.

    Sorry for my mistake earlier.

    The mouse off images do not have "_off" as part of the name. You will need to change the line so the selstate is a null string. by using:
    var selstate=""
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  5. #5

    Default Re: Navbar mouse on/off issues

    BLESS YOU!

    That took care of it. You know, I messed around with it a little last night and ALMOST did that. I tried leaving the "_" there as the _ was there for over and off in your code suggestions and that failed. I was going to try it without the _( so just "" as you suggested )but then didn't for some reason.

    It works it works it works and now the client is off my back! THANK YOU again!

  6. #6
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Navbar mouse on/off issues

    Glad I could help....even though I was a bit dull headed at first
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  7. #7

    Default Re: Navbar mouse on/off issues

    Soquili;

    I know it has been a year since you helped me with this but I wanted to say thank you again as your tip helped me out again today. You probably won't see this post but I am making it anyway!

    I actually lost the info somehow( no clue where I saved this tip??? )so I had to come here and search for it again. I have saved it again to a place with all my HTML/Java code cheat sheets and such so hopefully I won't lose it this time. Really helped me out.

    I have another site I am currently working on where the page status in the nav bar looks awful when it is on.

    Thank you again for the help.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •