Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nested javascript functions

 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

am having 2 JS functions. Function no:1 has to display a link for Function no:2 . Will this be possible with an anchor tag?

function no:1()
{
can I call function no:2 <a href ="....">
}
function no:2()
{
...
}
thanks
indu
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, the way you have it set up, the function #2 would be private member of function #1

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic