I have a Details Page which has Delete button of type (Details Type Button) whose Content-Source is of type on click javascript enabled. But if i keep it on click javascript enabled the button does not render on the mobile platform. So i changed its content-source type to Visual Force page.
I want to display a confirm message if the user clicks on this delete button on the same visual force page rather than it being redirected to another and then showing the confir message,how do i map this button into the visual force page (in this case a QUOTEDETAIL.page).
I have a small javascript which does it on-click, but how can i make this script execute since i changed its content-source type to VF page. The script is as shown below.
<script type="text/javascript">
var confirmed = confirm('Are you sure you want to delete the quote?');
if (confirmed) {
window.location.href = '{!URLFOR($Action.Quote__c.Delete,Quote__c.Id)}';
}
</script>
How can i get this script execute on click of this DELETE button, since it a VF page now not an on click javascript mode type? Please help me out