where do i get the return value of a javascipt method?

Jonas Pfenniger zimbatm at oree.ch
Wed Nov 21 04:19:26 EST 2007


2007/11/21, Ronald Evangelista <ironald at gmail.com>:
> how do i get the value of a javascipt confirm() function?
>
> a(:href=>R(DeleteUser, @user.id), :onclick => "javascript:confirm('You
> sure about this?')"){label}

Try adding the return statement, like "return confirm("sure ?")". But
it is better to use a post method for destructive actions.

-- 
Cheers,
  zimbatm


More information about the Camping-list mailing list