Question: I was asked in an interview what are the methods in AJAX other than GET and POST. I googled but I couldn't find any . Could someone please tell me.

Answer: 
That code is being executed on document's ready event, and not *inside* modal. You have to bind it to the [modal event](http://getbootstrap.com/javascript/#modals-events):

```
$(document).ready(function() {
    $('#myModal').on('shown.bs.modal', function () {
        $('#sig1').signaturePad({displayOnly:true, autoscale:true, drawBezierCurves:true, variableStrokeWidth:true}).regenerate(sig);
    })
});

```
You can run the JavaScript from anywhere within your script, not just within the modal. 
This will be called when the modal is opened.

```
    $( "#myModal" ).on('shown.bs.modal', function(){
        alert("Modal Opened!");
    });

```

Replace the `alert("Modal Opened!");` with the code you wish to run when the modal is opened