javascript - Closing bootstrap modal from asp.net code-behind -


i found answer, following error:

script:

<script type="text/javascript">     function closepopup() {         debugger;         $('#mymodal').modal('close');     } </script> 

code-behind:

    scriptmanager.registerstartupscript(me, me.gettype, "close modal popup", "closepopup();", true) 

error:

unhandled exception @ line 6, column 13594 in http://localhost:1230/scripts/bootstrap.min.js

0x800a01b6 - javascript runtime error: object doesn't support property or method 'close'

any ideas appreciated!

modal('toggle') instead of modal(toggle)

$(function () {    $('#modal').modal('toggle'); }); 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -