Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: javascript to update


Message #1 by "yls" <yls177@h...> on Thu, 30 Nov 2000 09:41:13 -0800
Hi there,

What you could do is create a form with the values that you want to update 
(checkboxes, textfields, whatever).
Then add an input of type="button". In the OnClick event of this button 
call a function that looks like the function below.
You could also call this function from an <A HREF> or from the OnSubmit 
event from the form.

function updateRecord()
{
         if (confirm("Are you sure you want to update the record??"))
         {
                 document.formName.submit();
         }
}

This will popup a dialog, asking whether the user wants to update or not. 
If yes is chosen, the form will be submitted as usual. If no is chosen, no 
action is taken.

HtH

Imar




At 11:24 AM 11/30/2000 -0800, you wrote:
>Hi, how to hava a javascript to confirm to update a record. A YES/NO popup
>will appear and the user has to choose yes so that the record will be
>updated
>
>
>

  Return to Index