<DIV>Thanks Paul.I will run this script now!</DIV>
<DIV>~Sam<BR><BR><B><I>Paul Novitski <paul@dandemutande.org></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Sam,<BR><BR>Here's one way of doing what you want, using standard form submit methodology:<BR><BR>
<SCRIPT language=JavaScript><br>function set(target) {<br> if (confirm("Are you sure you want to delete?")){<br> document.forms[0].dispatch.value=target;<br> document.forms[0].submit();<br> // -OR-<br> document.location = "deletePage.html";<br> }<br>}<br></SCRIPT>
<BR>...<BR>
<FORM action=deletePage.html method=post><BR><INPUT type=hidden name=dispatch><BR><BUTTON onclick="set('delete');">Delete</BUTTON><BR></FORM><BR><BR>Paul<BR><BR><BR>At 10:54 AM 3/10/2004, you wrote:<BR>>Hi<BR>><BR>>I want to show a pop up (delete confirmation in my page) when user clicks <BR>>on delete button.The pop up will show "Are you sure you want to delte-yes <BR>>or no"<BR>>If user clicks on yes, then my page should set a page variable names <BR>>"dispatch" to "delete".ANd then call my form's post action, which will <BR>>route it to the next page...<BR>>how do i accomplish these two tasks for the onlye one button click?<BR>>Thanks in advance,<BR>>Sam.<BR>><BR>>My code below:<BR>><BR>><BR>><BR>>
<SCRIPT language=JavaScript><br>><br>>function set(target) {document.forms[0].dispatch.value=target;}<br>><br>></SCRIPT>
<BR>><BR>>
<TABLE width="100%" border=1><BR>><BR>>
<TBODY>
<TR><BR>><BR>>
<TH><BR>><BR>><?xml:namespace prefix = html /><html:submit onclick="set('delete');">Delete</html:submit><BR>><BR>>......<BR>><BR>><BR>><BR>>so basically i want a pop up when user clicks the above Delete button <BR>>(struts uses <html:submit <br on click i when and button) HTML a generate to>>the yes on this pop up, i want the set(target) to get set<BR>><BR>>Thanks in advance for help,<BR>><BR>>Sam.<BR>><BR>><BR>>Do you Yahoo!?<BR>>Yahoo! Search - <HTTP: ?fr="ad-mailsig-home" search.yahoo.com>Find what <BR>>you're looking for faster.<BR>>_______________________________________________<BR>>Javascript mailing list<BR>>Javascript@LaTech.edu<BR>>https://lists.LaTech.edu/mailman/listinfo/javascript<BR><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript
<BLOCKQUOTE></BLOCKQUOTE>
<DIV></DIV></html:submit></TR></TBODY></BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>