homepage Welcome to WebmasterWorld Guest from 54.227.56.174
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Menu
jbhavin




msg:1478510
 9:27 am on Aug 28, 2003 (gmt 0)

hi,

When i have several links and i click on one of the hyprelink, it opens in a new page and i want that link to change it colour and should not a a link text anymore. and the rest o the link menu is same.

how do i do

 

jbhavin




msg:1478511
 9:33 am on Aug 28, 2003 (gmt 0)

here i mean, the page i am in, that menu link shld be in clicked state.

any help

MonkeeSage




msg:1478512
 10:13 am on Aug 28, 2003 (gmt 0)

Hello jbhavin:

If I understand you something like this should do the trick...
<script type="text/javascript">
<!--
function toText(link) {
var s = document.createElement("span");
s.innerHTML = link.innerHTML;
s.style.color = "red";
link.parentNode.replaceChild(s, link);
}
//-->
</script>

<a href="blah.htm" onclick="toText(this); return false;">Blah</a>

Jordan

jbhavin




msg:1478513
 10:57 am on Aug 28, 2003 (gmt 0)

hey thankx Jordan but see the problem has to be bit modified

say i have link

About us (ALL ARE H LINKS)
abc
def

now i click About Us, it takes me to new page

where linkare same
ABout us
abc
def
now here, "About us" should not be a hyper and shld have diff colour

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved