How can I capture the event when I click (focus) with the cursor
anywhere in the
page (that is, on a component or elsewhere). This event would occur in
an I.E 5.5 or later browser. 3 2732
Marcia Gulesian wrote: How can I capture the event when I click (focus) with the cursor anywhere in the page (that is, on a component or elsewhere). This event would occur in an I.E 5.5 or later browser.
Hello Marcia,
the event handlers on the body-element will do the job. http://www.w3.org/TR/html401/struct/...html#edef-BODY
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
onmouseout, onkeypress, onkeydown, onkeyup
e.g. <body onclick="your javascript code">
If you need information on the cursor position, look at these Microsoft proprietary
functions:
window.event.cl ientX
window.event.cl ientY
They give you screen relative coordinates and need an installed event-handler
e.g.
<script for="document" event="onmoused own()" language="JScri pt" type="text/jscript">
// your code to handle window.event.cl ientX and window.event.cl ientY
// or a function call to handle your needs
</script>
The following ones give parent-element relative coordinates
window.event.x
window.event.y
these are best called by an element event handler
e.g. <div onclick="alert( 'x/y='+window.even t.x+'/'+window.event. y);">click me</div>
For object relative coordinates:
window.event.of fsetX
window.event.of fsetY
They give the relative coordinates to the up left corner of the object
regards, Michael
Michael Schmitt wrote: Marcia Gulesian wrote:
How can I capture the event when I click (focus) with the cursor anywhere in the page (that is, on a component or elsewhere). This event would occur in an I.E 5.5 or later browser. Hello Marcia,
the event handlers on the body-element will do the job.
In MSIE 6 in standards compliant rendering mode, it will be better to
register event handlers on the root element, not the body. http://www.w3.org/TR/html401/struct/...html#edef-BODY onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
e.g. <body onclick="your javascript code">
If you need information on the cursor position, look at these Microsoft proprietary functions: window.event.cl ientX window.event.cl ientY They give you screen relative coordinates
clientX and clientY are browser content area (client area) coordinates.
Screen relative coordinates are given by event.screenX and event.screenY
in MSIE 5+
and need an installed event-handler e.g. <script for="document" event="onmoused own()" language="JScri pt" type="text/jscript"> // your code to handle window.event.cl ientX and window.event.cl ientY // or a function call to handle your needs </script>
The following ones give parent-element relative coordinates window.event.x window.event.y
event.x and event.y are mouse coordinates within a relatively positioned
element otherwise within its closest (within the document containment
hierarchy) relatively positioned containing element.
DU
these are best called by an element event handler e.g. <div onclick="alert( 'x/y='+window.even t.x+'/'+window.event. y);">click me</div>
For object relative coordinates: window.event.of fsetX window.event.of fsetY They give the relative coordinates to the up left corner of the object
regards, Michael
Thanks.
Michael Schmitt wrote: Marcia Gulesian wrote: How can I capture the event when I click (focus) with the cursor anywhere in the page (that is, on a component or elsewhere). This event would occur in an I.E 5.5 or later browser. Hello Marcia,
the event handlers on the body-element will do the job. http://www.w3.org/TR/html401/struct/...html#edef-BODY onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
e.g. <body onclick="your javascript code">
If you need information on the cursor position, look at these Microsoft proprietary functions: window.event.cl ientX window.event.cl ientY They give you screen relative coordinates and need an installed event-handler e.g. <script for="document" event="onmoused own()" language="JScri pt" type="text/jscript"> // your code to handle window.event.cl ientX and window.event.cl ientY // or a function call to handle your needs </script>
The following ones give parent-element relative coordinates window.event.x window.event.y these are best called by an element event handler e.g. <div onclick="alert( 'x/y='+window.even t.x+'/'+window.event. y);">click me</div>
For object relative coordinates: window.event.of fsetX window.event.of fsetY They give the relative coordinates to the up left corner of the object
regards, Michael This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve High |
last post by:
I'm working on an app where a page is created dynamically via a CMS,
and I need to save the page similar to the way you can save a
'complete web page' via a browser. I need to save the graphics,
links, embedded applets, flash, etc.
Is there any way that I can use native PHP code to 'capture' the web
page and maintain the functionality of the page?
|
by: aimee |
last post by:
Hi. Is there a way to capture the events fired in a PrintDialog? I
would like to capture when the user presses "Print" so I can do some
cleanup.
The asp.net (IE6) application I'm working on has 6 pages, each of
which has a link to a "print view" page. That "print view" page has a
"print" button which calls a javascript function "printThis":
function printThis() {
alert('printThis')
|
by: Jim Quast |
last post by:
I have an ASP page and a CREGReports002.vbs file coded to export data to
excel. I do this by building variables in a stored procedure. The ASP page
has text boxes, list boxes, and radio buttons. I also placed two buttons on
the form. One submits the form to redirect to the Crystal Web Viewer
(genCREGReports.ASP). The other one executes VB code in a vbs document that
spawns some more code to run a stored procedure with the values from...
|
by: Hose B |
last post by:
HI all,
I have a legacy app in which users can pick various page templates. There is
a template preview dialog. It works such that they view a list of icons in
an asp page that represent each available page template. Each template is a
straight-forward HTML file (not an asp or aspx) When a user clicks on an
icon, the text comprising the selected template's HTML file is read into a
string variable that is then injected into a <DIV> tag...
|
by: ABC |
last post by:
I. I have a video capture project, like AmCap, written in VB.NET. It
is a windows applications. Is it possible to put it into a web page?
II. Is the conversion in I complicated? Involve ActiveX or DirectShow?
Or it is not feasible?
III. Is it possible to use Windows Media Encoder to capture the video
and display it out immediately by itself or by a Windows Media Player?
Or it just uses for encoding some video into some specific formats...
| |
by: patrickprog |
last post by:
Purpose: Capture a web page listing for a current browser session. The web page will be from an https site, and this site does require a login. Therefore, the site cannot simply be referenced by using a direct URL. Example: when a user is in gmail, pushing a button either on the browser or on a second application would capture everything on the page. The file (html, bmp, or jpg) would then be uploaded to a specified location on the local...
|
by: =?Utf-8?B?Q2hha3JhdmFydGh5?= |
last post by:
Hi All,
We are working in a web application and we wanted to capture the full
webpage into an image file.
FULL WEBPAGE means, the page which is below the visibility of the screen and
you need to scroll down the page.
Am trying with GetActiveWindow MFC to gethold of the currnet window, but
could only read the visible area(length X width of the screen) but not the
|
by: DGS |
last post by:
Hi guys,
Not a developer, but an admin so please pardon my ignorance.
I have an issue that I was hoping to get help with. What I need is for the
front page of my site to capture the URL that the user is requesting.
Regardless of where they go, they are prompted to login...but I want the
initial login page to capture where they have REQUESTED to go and store it
somewhere (I assume a cookie).
|
by: empiresolutions |
last post by:
i want to do a screen capture/scrape of a page, resulting in a JPG or PNG that i could save in a dir of my choice. This capture needs to take place a few seconds after the page loads, to allow all JavaScript and Flash elements on page to load.
It would be great if i could also/just target a specific JS or Flash element to grab, instead of the whole page. There has to be some great PHP solutions for this.
Thanks, Cesar
|
by: Harsha |
last post by:
Hi,
I am using curl to capture the contents of the web page into a
variable, but i am having problems when the url given to curl gets
redirected to another page.
Please suggest me, is there a way to capture the contents of final
landing page, using curl or through any other method.
Thanks..
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |