Question Locked

show message box in asp & javascript after database validation

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi all,
i'm a newbie in web pogramming.
Right now i'm in a project using vb 6.0, asp and javascript.
Lately i'm stuck in showing a message box to user after a user inserting data that already exist in the database. so to do this, i'm trying to do the checking with asp to call the vb function that check the existency of that data, then show messagebox with javascript if that function returning 'true'.
so the javascript is inside a if-else asp.

but the result is that that message box is show in both condition. i wonder if there's some issue under putting a javascript inside a if-else body of asp, or could b my problem is elsewhere.

but if there's other suggestion to do what i'm trying to do here, is highly apreciated.

thx

3 replies

by deman960

I hope you will find this useful as I did after hours of search on the net. To send dialog box from asp script after some sort of processing (database digging etc): you assign the information to a variable. I am assuming you have some knowledge on serverside and clientside processing. The serverside variable can be processed on clientside using <%=VariableName%> (VariableName = variable you declared in you asp script). Assuming your declared the following:

var you;
you = somedatafromdatabase;

This can be placed any where in the asp file. Also set buffer to True to avoid logic error.

This discussion is closed to new replies.