Using a href onclick in asp 3.0 page

E

Ellie

I am trying to cancel a href by coding onclick="return false" in my page. I
can put in a function and have a test "alert" box come up but the "return
false" never works no matter what I try. Is there a problem with that and
asp? Thanks
 
P

Phillip Windell

Ellie said:
I am trying to cancel a href by coding onclick="return false" in my page. I
can put in a function and have a test "alert" box come up but the "return
false" never works no matter what I try. Is there a problem with that and
asp? Thanks

Hi Ellie,

You'd have to explain more clearly what you are doing,...but click events
are Client-Side (runs on the user's machine) and ASP runs on the Server-Side
(runs on the web server), and the two never really see or are aware of each
other. So it is really unrelated to ASP Classic. ASP has already finished
running (and has stopped/completed) before the user ever sees anything in
their browser,...by the same token the server never sees anything the user
does until the browser sends a new request containing a new URL with Post or
Querystring data back to the server.

There may still be someone around here that might answer it, but your best
bet is tro ask in one of the regular (non-ASP) Scripting Groups that pertain
the Web Developement.

--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
 
P

Phillip Windell

Looking over the group list, this one may be a good one, but there may be
others.

microsoft.public.inetexplorer.scripting


--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
 
O

Old Pedant

Ellie said:
I am trying to cancel a href by coding onclick="return false" in my page. I
can put in a function and have a test "alert" box come up but the "return
false" never works no matter what I try. Is there a problem with that and
asp? Thanks

AHA! I saw the posting in the MSIE newsgroup and replied. But now that I
see you are doing this in ASP.NET, I'll bet I know the answer!

If you are using an ASP.NET control (e.g., an <asp:linkbutton>), instead of
an ordinary <A HREF=...>, then you probably need to use onClientClick instead
of just onClick.
 
D

Daniel Crichton

Old wrote on Mon, 15 Sep 2008 13:40:02 -0700:


"Ellie" wrote:
AHA! I saw the posting in the MSIE newsgroup and replied. But now
that I see you are doing this in ASP.NET, I'll bet I know the answer!
If you are using an ASP.NET control (e.g., an <asp:linkbutton>),
instead of an ordinary <A HREF=...>, then you probably need to use
onClientClick instead of just onClick.


Where is ASP.NET mentioned? The subject says ASP 3.0 - that's the current
version of classic ASP.
 
P

Phillip Windell

Daniel Crichton said:
Old wrote on Mon, 15 Sep 2008 13:40:02 -0700:







Where is ASP.NET mentioned? The subject says ASP 3.0 - that's the current
version of classic ASP.

When you look futher to that actual issue being decribed it is Client side
Scripting that is running in the user's browser,...so it is not even ASP at
all of any kind.

--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
 
B

Bob Barrows [MVP]

Daniel said:
Old wrote on Mon, 15 Sep 2008 13:40:02 -0700:



my >> page. I can put in a function and have a test "alert" box
come up >> but the "return false" never works no matter what I try.
Is there a >> problem with that and asp? Thanks




Where is ASP.NET mentioned?

It must have been in the other group where this was posted.
 
E

Ellie

Inasmuch as I love a good "AHA", sadly, I am using ASP 3.0 and wrote in the
other group that I have found other people on the internet that are having
similar problems with Vista and IE7 (I bet I didn't mention that!).

This is what I wrote in the inetexplorer.scripting thread:

I found this and many other web sites:

http://11heavens.com/IE7-bug-report-onclick-event-handler

It isn't necessary that I use this since I came up with my workaround. I
have Vista (I want to stay current even if it kills me) and IE7 so I'm just
putting this down as "it just doesn't work for me". Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top