folkerts
|
| Posted: 07/23/2002, 7:24 PM |
|
I wanna use a javascript for a record on delete; it's a submit button, when i add a confirm('some text') on the onclick event it wil submit alway.
when i make it of type button i use
onclick="antw=confirm('some text');
if(antw){document.formname.Delete.Value='Delete';
document.formname.submit();}else{};";
i am doing something wrong but what.
regards.
|
|
|
 |
Drake
|
| Posted: 07/23/2002, 11:48 PM |
|
Try and add a "return false" statement to the 'else' part of the code and see if it works.
|
|
|
 |
folkerts
|
| Posted: 07/24/2002, 12:23 AM |
|
sorry dont work
|
|
|
 |
folkerts
|
| Posted: 07/24/2002, 12:53 AM |
|
tink it was a code error;
for anyone interested add the following code to youre delete button and it wil ask for confirmation.
OnClick="antw=confirm('some text');
if(antw){document.formname.Delete.Value='Delete';document.formname.submit();}else{return false};"
|
|
|
 |
folkerts
|
| Posted: 07/24/2002, 1:45 AM |
|
to make your code more portabel use
onclick="antw=confirm('delete??');
if(antw){return}else{return false};";
|
|
|
 |