topical media & game development

talk show tell print

basic-mysql-18-JSPApp-JSPFiles-dvdrentals.js / js



  
***************************************************************************** Author: Geoff Moes and Robert Sheldon Project: Begining MySQL - Chapter 18 Module: dvdrentals.js Date: 12/10/04 Description: This file contains the Javascript support functions for the web form submission. *****************************************************************************

  
  
  function doEdit(button, transactionId)
  {
     button.form.transaction_id.value = transactionId;
     button.form.command.value = "edit";
     button.form.action = "edit.jsp";
     button.form.submit();
  }
  
  function doAdd(button)
  {
     button.form.transaction_id.value = -1;
     button.form.command.value = "add";
     button.form.action = "edit.jsp";
     button.form.submit();
  }
  
  function doDelete(button, transactionId)
  {
     var message = "Deleting this record will permanently remove it.\r\n" +
                   "Are you sure you want to proceed?";
  
     var proceed = confirm(message);
  
     if(proceed)
     {
        button.form.transaction_id.value = transactionId;
        button.form.command.value = "delete";
        button.form.submit();
     }
  }
  
  function doCancel(button)
  {
     button.form.command.value = "view";
     button.form.action = "index.jsp";
     button.form.submit();
  }
  
  function doSave(button, command)
  {
     button.form.command.value = command;
     button.form.submit();
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.