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
.
.
.
sub checktable {
 my $tblname = $tblnme;
        my @tables = $dbh->tables();
          foreach my $table (@tables){
              if ( $table eq $tblname ){
                     # need to drop table
                           # Put up message box, call javascript ?
                               askit();
                         # Create Drop SQL
                         $dropval = "DROP TABLE " . $tblname;
              } 
          } # exit; # For testing
 }

Any assistance would be greatly appreciated.


Bill Willyerd
DSHS/DCS
Sems Database Group
664-5395

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to