•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,227 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,224 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 579 | Replies: 2
![]() |
•
•
Join Date: Feb 2008
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
Dear All,
I have a problem with delete confirmation code in java script.
i m using this code:
in Asp page on click of hyperlink tage message displays and on click of Cancel the next page is called where as in simple html file hyper tag code acts properly.
please suggest in this regars what i have to day and where i m making mistake
I have a problem with delete confirmation code in java script.
i m using this code:
<script LANGUAGE="JavaScript">
function confirmSubmit()
{
var agree=confirm("Are you sure you wish to continue?");
if (agree)
return true ;
else
return false ;
}
</script>please suggest in this regars what i have to day and where i m making mistake
Last edited by Tekmaven : Jul 14th, 2008 at 10:12 pm. Reason: Added code tags
Needo
What about just doing something like:
Or, if you need a function for several links:
<a href="delete.asp" onclick="return confirm('Are you sure you wish to continue?')">Delete</a>
Or, if you need a function for several links:
javascript Syntax (Toggle Plain Text)
<script type="text/javascript"> function confirmSubmit(){ return confirm('Are you sure you wish to continue?'); } </script>
html Syntax (Toggle Plain Text)
<a href="delete.asp" onclick="return confirmSubmit();">Delete</a>
Last edited by buddylee17 : Jul 14th, 2008 at 9:37 am.
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
•
•
Join Date: Jul 2008
Location: Sweet India
Posts: 828
Reputation:
Rep Power: 2
Solved Threads: 74
Try like this:
javascript Syntax (Toggle Plain Text)
<script language="JavaScript" type="text/javascript"> var d = document.form1; function del(x) { if(confirm("You want to delete this record")) { d.submit(); } return; } </script>
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Spry menu not working in IE
- Next Thread: cursor position


Linear Mode