473,566 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.onmous edown=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(objec t sender, System.EventArg s e){
if (!Page.IsClient ScriptBlockRegi stered("InterCe ptClickForClose Box"){
string str = //scriptJavaScrip t.
Page.RegisterCl ientScriptBlock ("InterCeptClic kForCloseBox",s tr);
}
}


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 1345

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

Similar topics

2
6569
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
17165
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 being uploaded. I'm also using the HtmlInputFile control to do the uploading. My problem is that when the user's file size exceeds 512k, the page...
2
2174
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 www.mydomain.com/page_that_does_not_exist.aspx. In the Application_BeginRequest, I am handling that by remapping the path to...
0
1191
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 the page request at that point to interrogate the requested page for possible redirect. I remember that in ASP 1.0 this was possible. Does...
0
7666
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, 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...
0
7584
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...
0
7888
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, 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. ...
0
8108
jinu1996
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...
0
7951
tracyyun
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...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
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
0
925
bsmnconsultancy
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...

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.