Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Isc.confirm and additional parameter

    Hi,

    I want to pass an additional parameter to isc.confirm(). Something like this:

    Code:
    function confirmDelete ( id ) {
        isc.confirm( 'Are you sure?' , function ( value ) {
                  if ( value )
                  {
                           AjaxRequest( '/url/'+ id );
                  }
             }
        );
    }
    As id is not a global var, them it is not working properly. Any ideas of how can i do this?

    Thanks,

    Fernando.

    #2
    That actually will work properly even if 'id' is not a global var, because every function is a "closure" in JavaScript. If it appears to not be working, something else is wrong with your code.

    Comment

    Working...
    X