Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Conditional Pop Up

Reply
Thread Tools

Conditional Pop Up

 
 
danielle.m.manning@gmail.com
Guest
Posts: n/a
 
      04-07-2006
I have seen several tips for opening a popup window by adding an
OnClick event to a button in the code behind for ASP.NET. This is
ALMOST what I need.

However, I only want to invoke the popup if one of five fields on my
form have had their "textChanged". I have an event called Set Dirty
which is below, which runs on the controls which I am concerned with
and decides if they have been changed or not. If they have, I am
setting "needReason" to true, and then I want to invoke the popup. The
problem is that the onClick event for my update button has already
passed, so I can't say, "if needReason = true then
btnUpdate.Add("OnClick")...etc. Is there any way to simulate an
Onclick button? Or another way I can conditionally open this popup?

Here is my setDirty Method

Private Sub SetDirty(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtPassword.TextChanged, _
txtSCBalance.TextChanged, cboPlusMinus.SelectedIndexChanged,
chkTerminate.CheckedChanged, txtUserRating.TextChanged
If doneini = True Then
'If any of the fields which require a transaction have
changed then we are going to set needReason to true
If sender.GetType.Name = "ComboBox" Then
If sender.selectedindex() <> -1 And (Not
sender.selectedvalue() Is DBNull.Value) Then
Me.outstandingChanges = True
Me.needReason = True
End If
ElseIf sender.GetType.Name = "TextBox" Then
If sender.text.trim() <> "" Then
Me.outstandingChanges = True
Me.needReason = True
End If
ElseIf sender.GetType.Name = "CheckBox" Then
Me.outstandingChanges = True
Me.needReason = True
End If
End If
End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do server-side processing and then display pop-up with pop-up blocker enabled domtam@hotmail.com ASP .Net 2 02-04-2006 06:03 PM
Conditional window pop up through JS sunilkeswani@gmail.com Javascript 2 12-15-2005 04:11 PM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
pop up prevention problem; for wanted pop ups joe doe Firefox 2 03-03-2005 08:08 AM
Pop-up to Buy Pop-up software William Young Computer Support 4 01-24-2004 12:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57