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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Return a message

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
Hi,

Not JavaScript but hope someone can help. I have a form.html; linked to submit.asp. The input field on the form to enter a value in a database. If users value alreday exists in the database I want a message returned "Value exists, please enter a new value.
 
hmm might have something like this on the submit.asp

Assuming you are redirecting right after you submit I have this example.

Code:
<%@Language=VBscript%>
<% Response.Buffer = True %>

'do your stuff for your database here, and check to see if it already exist, and set a trigger, lets call it existed.

if existed = false then
 continue and do what you wanted to do
 and redirect to new page
else
 Response.write &quot;<HTML><BODY>&quot;
 Response.write &quot;<Font color=red>Those values already exist</font>&quot;
 Response.write &quot;</BODY></HTML>&quot;
 Response.Flush
end if
Response.end

thats a pretty sketchy example, but you basically get the flow of the idea. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top