Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

one of the defined function in Javascript not working function name alertme()

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


alertme() function not working
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"not working" is not helping. Please read ItDoesntWorkIsUseless.
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i singleclick on the little page image it is not showing its source name . width and height
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any errors showing in the console? What have you done to check that the function is even being called?
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the <img> tag i changed the event of onClick= "alert('single');" it was clicked that means alertme() is also being called, but not sure why the message prompt is not there
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You did not answer either of my questions.
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No errors on the web browser..

I changed the function in the img onClick="alert('single click');"

and that is being called thats means alertme should also be called
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Hegde wrote:No errors on the web browser..
I didn't ask about the browser, but about the JavaScript console.

I changed the function in the img onClick="alert('single click');"
and that is being called thats means alertme should also be called

No, it doesn't. Put a simple alert (or beer yet, a console log statement) as the first line of the function and see if it is triggered
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ocument.littlebrain is not the correct way to reference an element on the page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic