asp.net mvc 3 - Call jquery function from another view -


I have a jquery function 'ShowerrorDialog' designated index.cshtml name and I have to call other Visual Test the same function. Cshtml

  Functional shearral diallog (msg) {$ ("# ErrorDialog"). Html (msg); $ ("# ErrorDialog"). Dialog ({modal: true, dialogClass: 'errorDialogClass', button: {"OK": function () {$ ("#errorDialog") .dialog ("close");}}}); }   

test.cshtml:

  @modelimimableable & lt; Ad_hoc reporting.models.grid model & gt; @ {Layout = null; } @ {If (@ Model.First () message == "session out".) {// ShowerrorDialog need to call here} else {var grid = new WebGrid (model, ajaxUpdateContainerId: "popup_content", rowsPerPage: 7) ; Grid.Pager (WebGridPagerModes.NextPrevious); & Lt; Div id = "popup_content" & gt; @ Grid.GetHtml (tableStyle: "webGrid", rowStyle: "webGridRow", headerStyle: "webGridHeader", footerStyle: "webgridFooter", alternatingRowStyle: "webGridAlternateRow", column: grid.Columns (grid.Column ( "QueryTitle", ( Format: @ & lt; label & gt; @ item.QueryTitle & lt; / labels & gt;), header: "query name", style: "color: gray"), grid.Column ((format: @ & lt; a href = "#" onclick = "javascript: OnEdit (this.id, select '@ item.QueryTitle');" class = "selectcss" id=@item.QueryId> & lt; / a & Gt;), header: "select"), grid.Column ((format: @    

You can insert functions into a normal file and tag Please use to use it.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -