can an event be controled in classical ASP?
can an event be controled in classical ASP?
am 20.02.2007 20:28:20 von bettys
Hi all,
I guess this probably a very silly question. I am not sure if this can be
done in classical asp. A button has to be clicked if a selection in drop
down list has been changed. If not, a pop up message pops and reminds the
user you need to click the button before continue. Can this be done in some
ways???
Thank you!
--
Betty
Re: can an event be controled in classical ASP?
am 20.02.2007 20:33:28 von reb01501
c676228 wrote:
> Hi all,
> I guess this probably a very silly question. I am not sure if this
> can be done in classical asp. A button has to be clicked if a
> selection in drop down list has been changed. If not, a pop up
> message pops and reminds the user you need to click the button before
> continue. Can this be done in some ways???
> Thank you!
> --
Not in asp. ASP is server-side technology. If your question concerns
buttons clicked by users to trigger client-side (browser) events, then
you are no longer in the realm of ASP. A client-side scripting group
such as .scripting.jscript will likely get you more help.
Having said that, you need to think more about your sequence of events.
At what point do you want to have the message appear? From your question
it appears that a user has to select an item and then click a button.
What does the user need to do to trigger the error message?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: can an event be controled in classical ASP?
am 21.02.2007 08:14:38 von stcheng
Hello Betty,
I'm wondering whether you're wantting to perform such event/checking every
time before the user submit the form/page or do you want to do such
event/checking whenever the user has changed the selected item in
dropdownlist(html select)?
In both cases, you need to use client side script code. For the first case,
you can add a script handler for html form's onsubmit event. e.g.
======================================
if it is the second case, you just need to add "onchange" client-side event
for the dropdownlist and do the checking(whether the button has been
clicked) and show alert.
Does this help?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: can an event be controled in classical ASP?
am 23.02.2007 19:26:10 von bettys
Bob and Steven,
Thank you both for your help. Steven, your post is very helpful.
My case is the second. Whenever there is a change in any dropdownlist
fields, the update button needs to be clicked for new quote. Based on your
idea, I can always
set original values in session variables and when submit button is clicked,
I can check if the request("filedname") is the same as each session variable
or not, if there is any difference and the flag value is still 0 and alert
user the "update" button needs to be clicked, if the flag=1 then continue...
the only thing I don't like my part is if there are many fields, that means
I need to use many session variables. I am afraid if too many users abandon
in the middle of processing, I could be in trouble. I usually abondon the
session right after a successful transaction, can you give me a
recommendation how to guarantee a session is removed even a user abandons it
in the middle? or do you have any other suggestion?
Thank you
--
Betty
"Steven Cheng[MSFT]" wrote:
> Hello Betty,
>
> I'm wondering whether you're wantting to perform such event/checking every
> time before the user submit the form/page or do you want to do such
> event/checking whenever the user has changed the selected item in
> dropdownlist(html select)?
>
> In both cases, you need to use client side script code. For the first case,
> you can add a script handler for html form's onsubmit event. e.g.
>
>
>
>
> ======================================
>
>
> if it is the second case, you just need to add "onchange" client-side event
> for the dropdownlist and do the checking(whether the button has been
> clicked) and show alert.
>
> Does this help?
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
> ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx .
>
> ==================================================
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
Re: can an event be controled in classical ASP?
am 26.02.2007 04:54:03 von stcheng
Hello Betty,
Thanks for your reply.
So I think your further question here is how to avoid using many session
variables to mark the flag of those input fields or status. I think this is
just like how to avoid do the checking at server-side. As mentioned in my
first approach, you can use "onsubmit" event of html
Re: can an event be controled in classical ASP?
am 09.03.2007 21:30:08 von bettys
Thank you, Steven. You are absolutely right. Thank you so much for the help.
--
Betty
"Steven Cheng[MSFT]" wrote:
> Hello Betty,
>
> Thanks for your reply.
>
> So I think your further question here is how to avoid using many session
> variables to mark the flag of those input fields or status. I think this is
> just like how to avoid do the checking at server-side. As mentioned in my
> first approach, you can use "onsubmit" event of html