Alert/ confirm, ok but...

Gertie

Active member
Joined
May 8, 2003
Messages
25
Location
Belgium
Im with my hands in my hair! Im trying to make a messagebox that changes!!

A normal message is no problem: just making a button and adding btnButton.attributes.add("onclick","return confirm(....);")

But i want to do this depending on the value i test in a textbox!!

So i have a textbox with a value in it. when its empty when pressed on the btnButton then i want a message "Please fill in something", and when its not a value from in my database (that i can test already easily) then it says "not in database" and else it says "found ...., do you want to....?"

Can someone help me?

Greetz
 
In the onClick of the ASP Button you can call a Sub in VBSCript runat=server. In the sub using Request.Form("textbox"), you can do validation and display the alert in JavaScript with the help of Response.Write or RegisterClientScriptBlock

Hope this helps to solve the problem.
 
Back
Top