JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2058
Number of posts: 5158

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Passing arguments and Relative coordinates in Jscript Posted by Weng on 23 Mar 2006 at 2:17 AM
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.
Report
Re: Passing arguments and Relative coordinates in Jscript Posted by zibadian on 23 Mar 2006 at 6:10 AM
: 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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.