jquery - To redirect to partial popup view in asp.net mvc3 -
hi i'm using mvc3 in application!!!! i'm opening popup window on click of link attach file
on popup there 2 buttons 1st button check validation size , save file on specified path
on second button need save file name database
till can open popup window this
@ajax.actionlink("attach file", "attachfile", new { id = item.id, size=itemfilesize }, new ajaxoptions { httpmethod = "get", updatetargetid = "result", insertionmode = insertionmode.replace, onsuccess = "openpopup" }) and calling function same view
<script type="text/javascript"> $("#result").dialog({ autoopen: false, title: 'title', width: 800, height: 275, modal: true }); function openpopup() { $("#result").dialog("open"); } </script> this running fine until press attach button on popup , try return result popup
now time when call popup
return partialview("attachfile",cwork); the popup window not open instead open normal form on window
here code on attachfile view
<form action="/coursework/attachfile/" method="post" enctype="multipart/form-data"> <td> <input type="file" name="file" id="file1"/> </td> <td> <input type="submit" name="attach" id="attach" value="@resources.prtf_attach" /> </td> </form> ....below submit button please tell me how can open view in same popup window , not normal page
you should call popup open function on onbegin in ajaxoptions instead of onsuccess. should close popup when onsuccess event fires
Comments
Post a Comment