|
 |
aspx thread: RE: Client side processing?
Message #1 by =?iso-8859-1?Q?Fredrik_Norm=E9n?= <fredrik.normen@e...> on Fri, 1 Dec 2000 09:01:53 +0100
|
|
If you look at the source in IE how would it look like then ?
I have no problem with the JavaScript when I run this example:
<%@ Page Language="C#" %>
<SCRIPT LANGUAGE="C#" RUNAT="Server">
void Page_Load( Object Sender,EventArgs E )
{
Controls.Add(new LiteralControl("<IMG id=\"12\" onclick=\"NodeClick()\"
WIDTH=\"16\" SRC=\"images/bs.gif\"/>"));
}
</SCRIPT>
<html>
<body>
<script language="JavaScript">
function NodeClick()
{
var src = event.srcElement;
alert(src.id);
}
</script>
</body>
</html>
/Fredrik Normén
-----Original Message-----
From: kevin.burton@i... [mailto:kevin.burton@i...]
Sent: den 30 november 2000 20:01
To: ASP+
Subject: [aspx] Client side processing?
I am having a hard time with events (particularly click events) and ASP.NET.
So I have decided to put together the following code:
<html>
<head>
<script language="JavaScript">
function NodeClick()
{
var src = event.srcElement;
}
</script>
<LINK REL="stylesheet" TYPE="text/css" HREF="toc.css" />
</head>
<body>
<iNewsControl:TreeView id="NRCSTreeView1" System="iNewsSystem"
Directory="." runat=server/>
.....
In the custom "TreeView" control I emit the following code:
// Add the <IMG> control to the list
Controls.Add(new LiteralControl("<IMG
onclick=\"NodeClick()\" WIDTH=\"16\" SRC=\"images/bs.gif\"/>"));
Yet when I click on the image the "NodeClick" function does not seem to be
called. I have put a breakpoint and put an "alert" in the handler and both
indicate that the function is not being called. Why doesn't the page
generated by ASP.NET accept this JavaScript code?
Thank you.
Kevin Burton
kevin.burton@i...
Message #2 by "Li, Fang" <fang@c...> on Thu, 30 Nov 2000 16:51:25 -0500
|
|
Are you sure "onclick" works with <IMG>?
Following comes from MSDN
"When a caller chooses an item from an IMG menu, the WTE clicks on the
corresponding AREA element. The onclick event is bubbled up to the
containing MAP element, but is not bubbled to the IMG."
-----Original Message-----
From: kevin.burton@i... [mailto:kevin.burton@i...]
Sent: Thursday, November 30, 2000 2:01 PM
To: ASP+
Subject: [aspx] Client side processing?
I am having a hard time with events (particularly click events) and ASP.NET.
So I have decided to put together the following code:
<html>
<head>
<script language="JavaScript">
function NodeClick()
{
var src = event.srcElement;
}
</script>
<LINK REL="stylesheet" TYPE="text/css" HREF="toc.css" />
</head>
<body>
<iNewsControl:TreeView id="NRCSTreeView1" System="iNewsSystem"
Directory="." runat=server/>
.....
In the custom "TreeView" control I emit the following code:
// Add the <IMG> control to the list
Controls.Add(new LiteralControl("<IMG
onclick=\"NodeClick()\" WIDTH=\"16\" SRC=\"images/bs.gif\"/>"));
Yet when I click on the image the "NodeClick" function does not seem to be
called. I have put a breakpoint and put an "alert" in the handler and both
indicate that the function is not being called. Why doesn't the page
generated by ASP.NET accept this JavaScript code?
Thank you.
Kevin Burton
kevin.burton@i...
Message #3 by Zulfazli <zulfazli@r...> on Fri, 1 Dec 2000 17:47:51 +0800
|
|
Yes, ofcourse it's work on <IMG>. I 've used it for my Cart.
I've some books, that user can get it to his/her cart with just click on
their images.
I do it with onclick event.
> -----Original Message-----
> From: Li, Fang [SMTP:fang@c...]
> Sent: Friday, 01 December, 2000 4:51 AM
> To: ASP+
> Subject: [aspx] RE: Client side processing?
>
> Are you sure "onclick" works with <IMG>?
>
> Following comes from MSDN
>
> "When a caller chooses an item from an IMG menu, the WTE clicks on the
> corresponding AREA element. The onclick event is bubbled up to the
> containing MAP element, but is not bubbled to the IMG."
>
>
>
> -----Original Message-----
> From: kevin.burton@i... [mailto:kevin.burton@i...]
> Sent: Thursday, November 30, 2000 2:01 PM
> To: ASP+
> Subject: [aspx] Client side processing?
>
>
> I am having a hard time with events (particularly click events) and
> ASP.NET.
> So I have decided to put together the following code:
>
> <html>
> <head>
> <script language="JavaScript">
> function NodeClick()
> {
> var src = event.srcElement;
> }
> </script>
> <LINK REL="stylesheet" TYPE="text/css" HREF="toc.css" />
> </head>
> <body>
>
> <iNewsControl:TreeView id="NRCSTreeView1" System="iNewsSystem"
> Directory="." runat=server/>
> .....
>
Message #4 by "Li, Fang" <fang@c...> on Fri, 1 Dec 2000 10:29:45 -0500
|
|
How about try following two cases:
<one>
<a href=".."><img src="x.gif"></a>
<two>
<INPUT TYPE=IMAGE SRC="wrox.gif" BORDER=0">
This works in a similar way to a SUBMIT element.
in IE5, it also supports the onClick event.
Fang
-----Original Message-----
From: Zulfazli [mailto:zulfazli@r...]
Sent: Friday, December 01, 2000 4:48 AM
To: ASP+
Subject: [aspx] RE: Client side processing?
Yes, ofcourse it's work on <IMG>. I 've used it for my Cart.
I've some books, that user can get it to his/her cart with just click on
their images.
I do it with onclick event.
> -----Original Message-----
> From: Li, Fang [SMTP:fang@c...]
> Sent: Friday, 01 December, 2000 4:51 AM
> To: ASP+
> Subject: [aspx] RE: Client side processing?
>
> Are you sure "onclick" works with <IMG>?
>
> Following comes from MSDN
>
> "When a caller chooses an item from an IMG menu, the WTE clicks on the
> corresponding AREA element. The onclick event is bubbled up to the
> containing MAP element, but is not bubbled to the IMG."
>
>
>
> -----Original Message-----
> From: kevin.burton@i... [mailto:kevin.burton@i...]
> Sent: Thursday, November 30, 2000 2:01 PM
> To: ASP+
> Subject: [aspx] Client side processing?
>
>
> I am having a hard time with events (particularly click events) and
> ASP.NET.
> So I have decided to put together the following code:
>
> <html>
> <head>
> <script language="JavaScript">
> function NodeClick()
> {
> var src = event.srcElement;
> }
> </script>
> <LINK REL="stylesheet" TYPE="text/css" HREF="toc.css" />
> </head>
> <body>
>
> <iNewsControl:TreeView id="NRCSTreeView1" System="iNewsSystem"
> Directory="." runat=server/>
> .....
>
Message #5 by kevin.burton@i... on Fri, 1 Dec 2000 20:49:45 -0600
|
|
FYI. Not to belabor this any longer but I know why I was decieved into
thinking that it did not work. I was relying on the debugger to break
into
the client code and that never happened. I was using dbgurt.exe and
http://localhost . . . so the server and the client were on the same
machine
but the debugger seems to only want to stop in "server" code.
Kevin
-----Original Message-----
From: Fredrik Norm=E9n [mailto:fredrik.normen@e...]
Sent: Friday, December 01, 2000 2:02 AM
To: ASP+
Subject: [aspx] RE: Client side processing?
If you look at the source in IE how would it look like then ?
I have no problem with the JavaScript when I run this example:
<%@ Page Language=3D"C#" %>
<SCRIPT LANGUAGE=3D"C#" RUNAT=3D"Server">
void Page_Load( Object Sender,EventArgs E )
{
Controls.Add(new LiteralControl("<IMG id=3D\"12\"
onclick=3D\"NodeClick()\"
WIDTH=3D\"16\" SRC=3D\"images/bs.gif\"/>"));
}
</SCRIPT>
<html>
<body>
<script language=3D"JavaScript">
function NodeClick()
{
var src =3D event.srcElement;
alert(src.id);
}
</script>
< /BODY>
< /html>
/Fredrik Norm=E9n
-----Original Message-----
From: kevin.burton@i... [mailto:kevin.burton@i...]
Sent: den 30 november 2000 20:01
To: ASP+
Subject: [aspx] Client side processing?
I am having a hard time with events (particularly click events) and
ASP.NET.
So I have decided to put together the following code:
<html>
<head>
<script language=3D"JavaScript">
function NodeClick()
{
var src =3D event.srcElement;
}
</script>
<LINK REL=3D"stylesheet" TYPE=3D"text/css" HREF=3D"toc.css" />
</head>
<body>
<iNewsControl:TreeView id=3D"NRCSTreeView1"
System=3D"iNewsSystem"
Directory=3D"." runat=3Dserver/>
.....
In the custom "TreeView" control I emit the following code:
// Add the <IMG> control to the list
Controls.Add(new LiteralControl("<IMG
onclick=3D\"NodeClick()\" WIDTH=3D\"16\" SRC=3D\"images/bs.gif\"/>"));
Yet when I click on the image the "NodeClick" function does not seem to
be
called. I have put a breakpoint and put an "alert" in the handler and
both
indicate that the function is not being called. Why doesn't the page
generated by ASP.NET accept this JavaScript code?
Thank you.
Kevin Burton
kevin.burton@i...
Message #6 by kevin.burton@i... on Fri, 1 Dec 2000 20:43:30 -0600
|
|
Sorry, I thought for sure that it did not work. Now when I retry it it
works. Again, sorry for the false alarm.
Kevin
-----Original Message-----
From: Fredrik Norm=E9n [mailto:fredrik.normen@e...]
Sent: Friday, December 01, 2000 2:02 AM
To: ASP+
Subject: [aspx] RE: Client side processing?
If you look at the source in IE how would it look like then ?
I have no problem with the JavaScript when I run this example:
<%@ Page Language=3D"C#" %>
<SCRIPT LANGUAGE=3D"C#" RUNAT=3D"Server">
void Page_Load( Object Sender,EventArgs E )
{
Controls.Add(new LiteralControl("<IMG id=3D\"12\"
onclick=3D\"NodeClick()\"
WIDTH=3D\"16\" SRC=3D\"images/bs.gif\"/>"));
}
</SCRIPT>
<html>
<body>
<script language=3D"JavaScript">
function NodeClick()
{
var src =3D event.srcElement;
alert(src.id);
}
</script>
---<BR>
Wrox Professional Web Developer Conference II<BR>
http://www.wroxconferences.com/WebDevEurope<BR>
November 29th - December 1st 2000, Amsterdam, Netherlands<BR>
Create powerful distributed web applications serving you now and<BR>
in the future. From ASP+ and VB.NET to XML and SQL Server 2000<BR>
---<BR>
You are currently subscribed to aspx as: Kevin.Burton@i...<BR>
To unsubscribe send a blank email to $subst('Email.Unsub')<BR>
</BODY>
</html>
/Fredrik Norm=E9n
-----Original Message-----
From: kevin.burton@i... [mailto:kevin.burton@i...]
Sent: den 30 november 2000 20:01
To: ASP+
Subject: [aspx] Client side processing?
I am having a hard time with events (particularly click events) and
ASP.NET.
So I have decided to put together the following code:
<html>
<head>
<script language=3D"JavaScript">
function NodeClick()
{
var src =3D event.srcElement;
}
</script>
<LINK REL=3D"stylesheet" TYPE=3D"text/css" HREF=3D"toc.css" />
</head>
<body>
<iNewsControl:TreeView id=3D"NRCSTreeView1"
System=3D"iNewsSystem"
Directory=3D"." runat=3Dserver/>
.....
In the custom "TreeView" control I emit the following code:
// Add the <IMG> control to the list
Controls.Add(new LiteralControl("<IMG
onclick=3D\"NodeClick()\" WIDTH=3D\"16\" SRC=3D\"images/bs.gif\"/>"));
Yet when I click on the image the "NodeClick" function does not seem to
be
called. I have put a breakpoint and put an "alert" in the handler and
both
indicate that the function is not being called. Why doesn't the page
generated by ASP.NET accept this JavaScript code?
Thank you.
Kevin Burton
kevin.burton@i...
Message #7 by Erwin Kodiat <Erwin.Kodiat@m...> on Sat, 2 Dec 2000 17:19:43 +0800
|
|
Do you guys know what is the difference between ASP+ and ASP.NET and
also
what is the difference between ADO+ and ADO.NET? TIA
Erwin Kodiat
Bali, Indonesia
Message #8 by danielw@w... on Sat, 2 Dec 2000 09:31:08 -0000
|
|
Hi Erwin,
The answer is "none whatsoever". ASP.NET and ADO.NET are just what ASP+
and ADO+ became after Microsoft's marketing department got hold of them.
HTH
Daniel Walker
Wrox Press
> Do you guys know what is the difference between ASP+ and ASP.NET and
> also
> what is the difference between ADO+ and ADO.NET? TIA
>
> Erwin Kodiat
> Bali, Indonesia
Message #9 by Imar Spaanjaars <Imar@S...> on Sat, 02 Dec 2000 10:31:46 +0100
|
|
There is no difference.
In the PDC release, everything was called +. Now in the first beta,
Microsoft decided to group all new technologies under the same umbrella,
called .NET. This is more a marketing thing, than that it says anything
about what has changed, I think. It also solves various future upgrade
problems. How should the next version of ASP+ be called. ASP5?? ASP+1?? Now
with the .NET name, that seems easier. ;-)
So ASP+ is the old name for ASP.Net. The same goes for ADO+ and ADO.NET.
Imar
At 05:19 PM 12/2/2000 +0800, you wrote:
>Do you guys know what is the difference between ASP+ and ASP.NET and also
>what is the difference between ADO+ and ADO.NET? TIA
>
>Erwin Kodiat
>Bali, Indonesia
>
>
>---
>Wrox Professional Web Developer Conference II
>http://www.wroxconferences.com/WebDevEurope
>November 29th - December 1st 2000, Amsterdam, Netherlands
>Create powerful distributed web applications serving you now and
>in the future. From ASP+ and VB.NET to XML and SQL Server 2000
Message #10 by "Fredrik Normen" <fredrik.normen@e...> on Sat, 02 Dec 2000 11:18:38 +0100
|
|
ASP+ was the old name for ASP.NET
MS change ASP+ to ASP=2ENET so they are the same=2C
it's the same for ADO+ and ADO.NET
/Fredrik Normen
----- Original Message -----
From=3A Erwin Kodiat =3CErwin=2EKodiat=40mitrais=2Ecom=3E
Date=3A Saturday=2C December 2=2C 2000 10=3A19 am
Subject=3A =5Baspx=5D RE=3A Client side processing=3F
=3E Do you guys know what is the difference between ASP+ and ASP=2ENET
=3E and also
=3E what is the difference between ADO+ and ADO=2ENET=3F TIA
=3E
=3E Erwin Kodiat
=3E Bali=2C Indonesia
=3E
=3E
Message #11 by SANJIB DUTTA <d_sanjib@y...> on Mon, 4 Dec 2000 03:39:45 -0800 (PST)
|
|
--- kevin.burton@i... wrote:
> I am having a hard time with events (particularly
> click events) and ASP.NET.
> So I have decided to put together the following
> code:
>
> <html>
> <head>
> <script language="JavaScript">
> function NodeClick()
> {
> var src = event.srcElement;
> }
> </script>
> <LINK REL="stylesheet" TYPE="text/css"
> HREF="toc.css" />
> </head>
> <body>
>
> <iNewsControl:TreeView id="NRCSTreeView1"
> System="iNewsSystem"
> Directory="." runat=server/>
> .....
>
> In the custom "TreeView" control I emit the
> following code:
>
> // Add the <IMG> control to the
> list
> Controls.Add(new
> LiteralControl("<IMG
> onclick=\"NodeClick()\" WIDTH=\"16\"
> SRC=\"images/bs.gif\"/>"));
>
> Yet when I click on the image the "NodeClick"
> function does not seem to be
> called. I have put a breakpoint and put an "alert"
> in the handler and both
> indicate that the function is not being called. Why
> doesn't the page
> generated by ASP.NET accept this JavaScript code?
>
> Thank you.
>
> Kevin Burton
> kevin.burton@i...
>
>
you did not mention where(in which method) you have
add the literal control.it should be in the
createControl method.unless you send the full code it
is difficult to understand the problem
|
|
 |