Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Passing arguments and Relative coordinates in Jscript

WengWeng Member Posts: 52
Hi,

I would like to pass an integer to a javascript function. How do I do that for the function definition header and the called function?

And, are there functions in jscript which gives mouse coordinates Relative to the control? e.g the top left coordinates of a listbox is (0,0) instead of its position on the screen.
Currently, I use window.event.x and window.event.y to find the coordinates.

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hi,
    :
    : I would like to pass an integer to a javascript function. How do I do that for the function definition header and the called function?
    :
    : And, are there functions in jscript which gives mouse coordinates Relative to the control? e.g the top left coordinates of a listbox is (0,0) instead of its position on the screen.
    : Currently, I use window.event.x and window.event.y to find the coordinates.
    :
    See http://www.w3schools.com/js/js_functions.asp for the first answer. I don't know the answer to the second, but you might also find that on w3schools.
Sign In or Register to comment.