Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 25th, 2003, 09:40 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default multiple confirmations

Hi
i am doing my project in asp.net using vb as script language.I want execute one stored procedure when ever user click on button say "button1".
but before executing that stored procedure i want to display multiple confirmation alerts to user example
1.amount>100 still you want to proceed?
2.Qty all ready exceeded still want to continue ?
ect .
this is my actual requirment.
my approach is like this on page load i am specifying

Button1.Attributes.Add("onclick", "if(confirm('amount>100 still you want to proceed?')){}else{return false}")

 Button1.Attributes.Add("onclick", "if(confirm('Qty all ready exceeded still want to continue ?')){}else{return false}")

so when ever user click button1 its promting the final alert not all alerts .

i hope i cleared my problem.pl help me how to proceed.

thanks.


 
Old September 26th, 2003, 01:52 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Change your code to this:

Button1.Attributes.Add("onclick", "if(confirm('amount>100 still you want to proceed?')){}else{return false};if(confirm('Qty all ready exceeded still want to continue ?')){}else{return false};")

The second ".Add" is overwriting the first one.

Peter
 
Old November 18th, 2004, 05:49 PM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to pass a variable to a client-side function with the on-click event?

ie Right now I have the following:
Button1.Attributes.Add("OnClick", "myFunction()");

If I want to pass a string to myFunction, how would I do that? I'm currently doing this which is obviously incorrect:

Button1.Attributes.Add("OnClick", "myFunction('string')");

 
Old November 22nd, 2004, 11:10 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What's wrong with that? I don't see how else you could do it. All you can do is write javascript in the attribute, whatever you can do in javascript goes.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Datasets from multiple Data Sources SQL_Hacker Reporting Services 1 June 18th, 2008 02:25 PM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Multiple ADO multiple user login Oracle9i jhay0721 Pro VB Databases 1 April 4th, 2005 11:23 AM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.