Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do javascript alert box in VWD 2008 (noob)

Status
Not open for further replies.

scotttom

IS-IT--Management
Mar 5, 2002
143
US
I'm having trouble getting this to work and it seems like it should be so easy. The code below works on my machine but throws this...

"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation."

when i run it on the server. I've done enough research to discover that I am approaching this incorrectly and should be using client side javascript, but I'm unclear about what to put where.

Thanks in advance.

Scott

Here is my code section....

Code:
<script runat="server" >
    

 
    Protected Sub Lastcheck(ByVal sender As Object, ByVal e As System.EventArgs)
        If TextBox1.Text <> "" Then
            TextBox2.Text = ""
            GridView3.DataBind()
            If (GridView2.Rows.Count = 0) Then
                
                MsgBox("No Last Name match in the list!", MsgBoxStyle.OkOnly, "No Match")
                TextBox1.Text = ""
          
            End If
            Panel1.Visible = False
            Panel2.Visible = True
            Panel3.Visible = True
            DropDownList2.Text = "*"
            
        End If


</script>


and here is my html.....
Code:
                       <asp:TextBox ID="TextBox1"  OnTextChanged="Textchange" autopostback=true runat="server"></asp:TextBox><span style="font-family: Gill Sans MT"><strong>
                        </strong></span>
                        <asp:Button ID="Button1" runat="server" OnCommand="FirstClear" UseSubmitBehavior="true"  Text="Search" /><span style="font-family: Gill Sans MT"><strong> </strong></span>
 
O Hai! I think you got the wrong forum... I can't see this is a Javascript question... there isn't any Javascript in your code at all... it's VB [smile]

K, thnxbye



[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top