Sunday, November 15, 2009

David P. Barnhart David P. Thanx For Your Answer, But I Still Need Help, How Do You Do This? I Can Design Upto Onclick Button ?

David P. Thanx for your answer, but I still need help, how do you do this? I can design upto onclick button ? - david p. barnhart

If you have an image tag in HTML:

\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; img src = "blank_image.jpg">

Add the following lines into the HTML:

\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; img src = "blank_image.jpg" onClick = "userClickedImage (1,1)">

Repeat to change the process for each picture, but the parameters for sending the picture to identify you that the square Click on the picture of my everyone.

Put then the javascript:

userClickedImage function (x, y) (...)

And the function that the DOM call will change the image source.

W3Schools.com a great tutorial on JavaScript, which is probably sensible to do is:

http://www.w3schools.com/JS/default.asp

And the DOM tutorial will help you with the exact syntax of the changing image and other manipulations of the terrain:

http://www.w3schools.com/HTMLDOM/default ...

(For example, special attention to DOM / section of the image: http://www.w3schools.com/HTMLDOM/dom_obj ...

No comments:

Post a Comment