Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Another Javascript Question. lol
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

JJenson
Advanced Member

USA
2121 Posts

Posted - 15 March 2008 :  22:04:40  Show Profile  Visit JJenson's Homepage
Ok I have a problem I have a javascript statement like this

Rollupanddown('topNav',"> Services > "+id,50,"slide",92,20,1);//,"roll");

Now in this part I need turn services into a link. Anyone know how I can do this within the javascript?

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 March 2008 :  09:02:47  Show Profile
Rollupanddown("topNav","&gt; <a href=\"URI\">Services</a> &gt; "+id,50,"slide",92,20,1)

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 16 March 2008 09:03:42
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 16 March 2008 :  11:51:35  Show Profile  Visit JJenson's Homepage
Thanks Shaggy it didn't work I will be more descriptive if anyone could help out I would really aprpeciate it. I will explain in further detail.

I have a page located here:
glacier.makeityourweb.com

Now when you click on the link like services then click on the of the sub links at the bottom of the page like Identity then in the breadcrumb at the top it displays something like:

Home > Services > Identity

Where Home and Services need to be a link to those divs and Identity is highlighted text. If you view the source for the page all the code is there. I am completely lost on what I need to do from here.

This is the function to display the text:

function changelink(id)
function SlideTopNavDownUp(id,newtext)

I am just at a lost and have no idea how to do this one feature if I can figure this out the site is done I just need it done now

Thanks anyone who can help.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 16 March 2008 :  15:17:21  Show Profile  Visit JJenson's Homepage
I apologize this is the function that is needing the change. I tried the fix and now I get a expected indentifier error now.

function changetext(id,newtext,linkid)
{
var obj = document.getElementById(id);
obj.firstChild.nodeValue = newtext;
if(id == 'home')
obj.firstChild.nodeValue = "";
else
if(linkid == 'Portfolio' || linkid == 'Services')
obj.firstChild.nodeValue = (<a href="\javascript:TopNavEffect('linkid','linkid','');"\>linkid</a>+' > '+ newtext);
else
obj.firstChild.nodeValue = newtext;
}
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 16 March 2008 :  17:24:33  Show Profile  Visit JJenson's Homepage
Nevermind I got it. Thanks all.


function changetext(id,newtext,linkid)
{
var navdiv = document.getElementById('topNav');
if(id == 'home')
navdiv.innerHTML = "<a href=\"javascript:TopNavEffect('home','','');\" id=\"home1\" style=\"color:#5A646E;height:20px\" onmouseover=\"changeColors('home1',hoverspeed)\" onmouseout=\"changeColorsBack('home1',hoverspeed)\">Home</a>";
else
if(linkid == 'Portfolio' || linkid == 'Services')
{
if(linkid == 'Portfolio')
navdiv.innerHTML = "<a href=\"javascript:TopNavEffect('home','','');\" id=\"home1\" style=\"color:#5A646E;height:20px\" onmouseover=\"changeColors('home1',hoverspeed)\" onmouseout=\"changeColorsBack('home1',hoverspeed)\">Home</a> > <a href=\"javascript:TopNavEffect('Portfolio','Identity Gallery','Portfolio');\" style=\"text-decoration: none; font-size: 11px; color:#5A646E;\" id=\"portfolio4\" title=\"Portfolio\" onmouseover=\"changeColors('portfolio4',hoverspeed);\" onmouseout=\"changeColorsBack('portfolio4',hoverspeed);\">Portfolio</a> > <span id=\"spanLink\" style=\"color: #9AC0D7;height:20px;font-size:12px\">"+newtext+"</span>";
else
navdiv.innerHTML = "<a href=\"javascript:TopNavEffect('home','','');\" id=\"home1\" style=\"color:#5A646E;height:20px\" onmouseover=\"changeColors('home1',hoverspeed)\" onmouseout=\"changeColorsBack('home1',hoverspeed)\">Home</a> > <a href=\"javascript:TopNavEffect('services','Services','');\" style=\"text-decoration: none; font-size: 11px; color:#5A646E;\" id=\"service2\" title=\"Services\" onmouseover=\"changeColors('service2',hoverspeed);\" onmouseout=\"changeColorsBack('service2',hoverspeed);\" >Services</a> > <span id=\"spanLink\" style=\"color: #9AC0D7;height:20px;font-size:12px\">"+newtext+"</span>";
}
else
navdiv.innerHTML = "<a href=\"javascript:TopNavEffect('home','','');\" id=\"home1\" style=\"color:#5A646E;height:20px\" onmouseover=\"changeColors('home1',hoverspeed)\" onmouseout=\"changeColorsBack('home1',hoverspeed)\">Home</a> > <span id=\"spanLink\" style=\"color: #9AC0D7;height:20px;font-size:12px\">"+newtext+"</span>";
}
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 March 2008 :  05:28:20  Show Profile
Good stuff


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 18 March 2008 :  17:22:04  Show Profile  Visit JJenson's Homepage
Thanks took a while but worked it out in the end.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07