This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes nested javascript functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "nested javascript functions" Watch "nested javascript functions" New topic

nested javascript functions

indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123

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()

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
no, the way you have it set up, the function #2 would be private member of function #1

I agree. Here's the link:
subject: nested javascript functions
It's not a secret anymore!