I have a custom link I created and added to the home page. It's a javascript link and it starts a batch process. What I would like to do is give the user a confirmation dialog like

var rtn = confirm('Do you really want to do this?')

but I get an error that says confirm is not defined?

  • 1
    Welcome to SFSE, @user4978. I surrounded your code in a code format block so that it would show up the way that you typed it in. Your code looks alright to me. Perhaps you could try window.confirm? – Peter Knolle Dec 21 '13 at 23:55
  • Which browsers have you tried? can you try with a HTML component <a href="#" onclick="if(confirm('Are you sure?')){alert('batch submission goes here');}">click</a>? – eyescream Dec 22 '13 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.