homepage Welcome to WebmasterWorld Guest from 54.161.192.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
help with tree menu
mcnika

5+ Year Member



 
Msg#: 3656137 posted 8:42 am on May 22, 2008 (gmt 0)

Hi all.

This is a code of a tree menu.
I need to know what meens

onClick="javascript:{show(tr2,2); return false;}

why is needed "return false" and what is javascript:{........

Please reply me as soon as possible.Thanks a lot.

<html>
<head>
</head>
<body bgcolor="#F2F2F2">
<SCRIPT language=javascript>
function show(sec, n){
if (sec.style.display=="none")
sec.style.display="block";
else
sec.style.display="none";

}
</SCRIPT>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left">
<A onClick="javascript:{show(tr1,1); return false;}" href=""><STRONG>Image Configurations</STRONG></A>
<DIV id=tr1 style="DISPLAY: none; padding-left:50px;" align=justify>
Upload<br />
View Images<br />
</DIV>
</td>
</tr>
<tr>
<td align="left">
<A onClick="javascript:{show(tr2,2); return false;}" href=""><STRONG>Section</STRONG></A>
<DIV id=tr2 style="DISPLAY: none; padding-left:50px;" align=justify>
Add<br />
View All Section<br />
</DIV>
</td>
</tr>
</table>
</body>
</html>

 

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