all groups > dotnet jscript > april 2004 >
You're in the

dotnet jscript

group:

Page hit


Re: Page hit Raymond Lewallen
4/6/2004 10:07:01 AM
dotnet jscript: Ruca,

Look at System.Drawing.Point
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemdrawingpointclasstopic.asp

And

Control.PointToScreen method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformscontrolclasspointtoscreentopic.asp

HTH,

Raymond Lewallen

[quoted text, click to view]

Re: Page hit CJ Taylor
4/6/2004 10:10:10 AM
you can handle it in the event such as click or doubleclick (depending on if
its availiable).

you can hittest.

you can use the API.


[quoted text, click to view]

Re: Page hit Raymond Lewallen
4/6/2004 10:27:05 AM
Ruca,

Wasn't paying attention :) I don't believe the Drawing namespace of
Control.PointToScreen method will work for you in a web based solution..
only in windows forms solutions.

Sorry for trying to confuse you :)

Raymond Lewallen

[quoted text, click to view]

Re: Page hit bruce barker
4/6/2004 10:46:14 AM
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)



[quoted text, click to view]

Page hit ruca
4/6/2004 4:00:40 PM
How can I get the coordinates of where I click with the mouse?
It is possible to know?


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Re: Page hit Cor
4/6/2004 5:15:20 PM
Hi Ruca,

Are you using fixed webpages.

I do not believe that this is standard possible with HTML pages. Maybe you
can use the area map for this or something.

(I type this more to show the others you are using ASPX)

:-)

Cor

Re: Page hit ruca
4/8/2004 11:45:16 AM
Where should I call them?


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca.



"bruce barker" <nospam_brubar@safeco.com> escreveu na mensagem
news:%233QwP8$GEHA.2408@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Re: Page hit bruce barker
4/8/2004 8:31:57 PM
in client code. if you the x & y on the server, then you want to use an
image map

-- bruce (sqlwork.com)



[quoted text, click to view]

Re: Page hit Lithium
4/9/2004 5:01:05 AM
This easy solution is for internet explorer - PS Mozilla suck

<html onclick="get_Coords();"><body
for internet explore
set in the html tag an onclick event
<p>dsjkafdskfda</p><script language="JScript"
function get_Coords(

alert ("relative to Client Area Origin: \r\n"
event.clientX+"\r\n"
event.clientY
"\r\n relative to Screen Area Origin: \r\n"
event.screenX+"\r\n"
event.screenY)

AddThis Social Bookmark Button