This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes one of the defined function in Javascript not working function name alertme() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "one of the defined function in Javascript not working function name alertme()" Watch "one of the defined function in Javascript not working function name alertme()" New topic
Author

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

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055



alertme() function not working


http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

"not working" is not helping. Please read ItDoesntWorkIsUseless.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

when i singleclick on the little page image it is not showing its source name . width and height
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

Any errors showing in the console? What have you done to check that the function is even being called?
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

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

Joined: Jan 10, 2002
Posts: 61449
    
  67

You did not answer either of my questions.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

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

Joined: Jan 10, 2002
Posts: 61449
    
  67

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
ocument.littlebrain is not the correct way to reference an element on the page.
 
jQuery in Action, 2nd edition
 
subject: one of the defined function in Javascript not working function name alertme()