Advertisement

03.11.2008 at 12:54PM PDT, ID: 23233044
[x]
Attachment Details

How to use window.event.srcElement in javascript

Asked by michael1174 in JavaScript, Programming for ASP.NET

Experts,

How can I reference my Update button (the one that fires the command update) on a datagrid through calling window.event.srcElement in javascript?

I basically have the following javascript function but its not properly referencing my update button...I need someone to help me properly set btn to reference my update button.

Thanks!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
function fnKeyPress(){
			var btn = window.event.srcElement.parentNode.firstChild;
			if (btn) {
			
				if (event.keyCode == 13)
				{
				event.returnValue=false;
				event.cancelBubble = true;
				
				btn.click();
				}
			}
[+][-]03.11.2008 at 01:29PM PDT, ID: 21099885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.11.2008 at 01:31PM PDT, ID: 21099921

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 05:19AM PDT, ID: 21105065

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 05:22AM PDT, ID: 21105096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 05:53AM PDT, ID: 21105347

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 05:58AM PDT, ID: 21105405

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Programming for ASP.NET
Sign Up Now!
Solution Provided By: TheLearnedOne
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.12.2008 at 06:26AM PDT, ID: 21105656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 06:29AM PDT, ID: 21105687

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2008 at 07:12AM PDT, ID: 21106123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628