Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Macromedia Dreamweaver > YES/NO msgbox f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 93863 of 98347
Post > Topic >>

YES/NO msgbox for asp web form

by "Sean022" <webforumsuser@[EMAIL PROTECTED] > Aug 8, 2008 at 10:21 AM

Hey everyone,

 hope your fridays are going well, not long until the weekend now! I could
do 
with your help. Once again I've been mistaken for a pro web developer and
asked 
to do something I have no clue about! I need to add an Yes / No dialog box
for 
a form option which deletes a users details from a database table. Many
thanks 
for you help.

 1. asp button at the end of the form runs a onclick function
 2. dialog box shows asking "Are you sure you want to delete you details? 
Buttons - Yes / No"
 3. Selecting 'No' stops the form from submitting, selecting 'Yes' submits
the 
form.

 I have found this code but am not sure how to implement it:

 function confirmDelete() {
 return window.confirm("are you sure?");
 }

 in Page_Load function:

 Button1.Attributes.Add("OnClick", "return confirmDelete()")

 if its in DataGrid Item Template

 Dim i As Integer
 For i = 0 To DataGrid1.Items.Count - 1
 Dim Btn as Button = DataGrid1.Item(i).FindControl("Button1")
 Btn.Attributes.Add("OnClick", "return confirmDelete()")
 




 4 Posts in Topic:
YES/NO msgbox for asp web form
"Sean022" <w  2008-08-08 10:21:23 
Re: YES/NO msgbox for asp web form
"darrel" <no  2008-08-08 08:17:07 
Re: YES/NO msgbox for asp web form
"Sean022" <w  2008-08-08 15:14:29 
Re: YES/NO msgbox for asp web form
"darrel" <no  2008-08-08 10:39:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 1:11:04 CST 2008.