Passing arguments and Relative coordinates in Jscript - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Passing arguments and Relative coordinates in Jscript

WengWeng Posts: 52Member
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 Posts: 6,349Member
    : 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.