473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

intercept in JavaScript in aspx page



Hi,

I am beginner in aspx. I would like to intercept all click events on
my document. I use this function in javascipt for that
document.onmousedown=click;. It works well. But I would like to
continue the execution code on a other button or anything else.
Example
1) Click anywhere intercept click->Execute the code in function click().
2) Click on a link…. intercept click -> Execute the code in function
click() ->Load the link(http://test.html)
3) Click on a button… intercept click-> Execute the code in function
click() ->Execute the code for the button(submit, or other javascript)

and this script I put in

Private void Page_Load(object sender, System.EventArgs e){
if (!Page.IsClientScriptBlockRegistered("InterCeptCli ckForCloseBox"){
string str = //scriptJavaScript.
Page.RegisterClientScriptBlock("InterCeptClickForC loseBox",str);
}
}


Thank a lot for your help…

function click() {
if (event.button==1) {
alert(“Test event”)
//execute before….ex close all div
}
//Here continue code
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
0 1326

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Susan van Houen | last post by:
Hi All, How do I intercept an autopostback on the client side and prevent it from executing the submit? In classic ASP I used to intercept the on_submit and just return false;
25
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
2
by: Jonathan Folland | last post by:
I have been working on this most of the day and cannot find a solution to my problem. I have an application where I may not actually have a page. for example a user may make a request for...
0
by: rsiena | last post by:
When a page is requested in the .net architecture I believe there are a number of events that happen prior to .net actually trying to find the page in the file system. I would like to intercept...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.