aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to call a function within a function. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to call a function within a function." Watch "How to call a function within a function." New topic
Author

How to call a function within a function.

samuel marin
Greenhorn

Joined: Nov 18, 2011
Posts: 16
I'm trying to call a function within a function.

This Code works. The function TitleOnChange and Show the message "Hello World".




Now is funny, because if I change the code of the TitleOnChange Function to:



And this does not work.

I guess I'm doing something wrong in the code above.

I tried all the following combinations:



Thank you very much again
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do you not indent your code?




That is saying the value is equal to a variable Revenue, not a string "Revenue".

Have you debugged your code and see what document.form.select.value is?

Eric
samuel marin
Greenhorn

Joined: Nov 18, 2011
Posts: 16
How can I debugge my code?

That would be great, I didn't konw I could debugge javascript.

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Simple as



or you can use the built in consoles of the browser [firefox requires Firebug]

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

All modern browsers (except Firefox) have a built-in debugger. Trying to write client-side code without one is like playing concert piano wearing mittens. Learn the tools at your disposal!


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call a function within a function.