[Javascript] Pop up in javascript
Samyukta Akunuru
samyuktaakunuru at yahoo.com
Thu Mar 11 12:41:34 CST 2004
Thanks Paul.I will run this script now!
~Sam
Paul Novitski <paul at dandemutande.org> wrote:
Sam,
Here's one way of doing what you want, using standard form submit methodology:
function set(target) {
if (confirm("Are you sure you want to delete?")){
document.forms[0].dispatch.value=target;
document.forms[0].submit();
// -OR-
document.location = "deletePage.html";
}
}
...
[input]
Delete
Paul
At 10:54 AM 3/10/2004, you wrote:
>Hi
>
>I want to show a pop up (delete confirmation in my page) when user clicks
>on delete button.The pop up will show "Are you sure you want to delte-yes
>or no"
>If user clicks on yes, then my page should set a page variable names
>"dispatch" to "delete".ANd then call my form's post action, which will
>route it to the next page...
>how do i accomplish these two tasks for the onlye one button click?
>Thanks in advance,
>Sam.
>
>My code below:
>
>
>
>
>
>function set(target) {document.forms[0].dispatch.value=target;}
>
>
>
>
>
>
>
>
>
>Delete
>
>......
>
>
>
>so basically i want a pop up when user clicks the above Delete button
>(struts uses >the yes on this pop up, i want the set(target) to get set
>
>Thanks in advance for help,
>
>Sam.
>
>
>Do you Yahoo!?
>Yahoo! Search - Find what
>you're looking for faster.
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040311/f4862833/attachment.htm>
More information about the Javascript
mailing list