Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call a function within a function.

 
samuel marin
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I debugge my code?

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

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple as



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

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic