You can't approach it this way, simply because Javascript runs only on
the client and you'd need to make a connection to the server or pass
all your table names across or use Java for this. You may also get away
with using a Form and Frames. The standard way is to submit the form to
some server side code to do a check and then return a suitable output.
To my mind, what your ASP is doing is a little scary as it has the
potential to be misused or for tables to be deleted that shouldn't be
etc.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 15 December 2000 15:08
> To: [EMAIL PROTECTED]
> Subject: FW: Perl Embed Javascript call
>
>
> This code is embedded in a server side ASP page. This page
> will create a new db table based on a field value. I need to
> check the existing tables and if the table already exists....
> give the user an option:
> Drop the table OR go back and check things over again. I am
> working with programmers not the general public.
> I thought I could call a Javascript or VBscript or whatever,
> to pop up an alert. Then check the value returned and take
> appropriate action.
> How would I call the Javascript or other function that would
> display a message?
> code follows:
> LT script language="Javascript" GT
> LT!--
> function askit(){
> var re_check = confirm("A Table already exists for the
> Record you are submitting. Click 'OK' to have the table
> dropped. Click 'CANCEL' to exit and return to Last page.")
> if (re_check){
> // continue with DROP
> } else {
> history.go(-1);
> exit;
> }
> }
> // -- GT
> LT/scriptGT
>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web