jquery - Using SimpleModal and ASP.NET MVC -


I am using simple model with asp.net MVC I have set it up using the OSX demo, Which loads a sequence in the dialog.

I am using Javascript:

  jQuery (function ($) {$ ("Input.ema, a.ema"). Click (function E {e.preventDefault (); $ ("# osx-modal-content"). Modal ({appendTo: 'form', overlayId: 'osx' OSX-container ', closed HTML:' & lt; div class = "Closed">  X , , minHeight: 80, Opacity: 65, Position: ['0',], overlayclose: true, on open: OSX.open, onClose: OSX.close, onShow: OSX.show});}) var OSX = {container: blank, open: function (D) {var self = this; $ .ajax ({url: "/ message / user message /", Type: 'GET', Data type: 'html', // & lt; - - Success to expect an HTML response: doSubmitSuccess}; function doSubmitSuccess (result) {$ ('div # osx-modal-data ') .html (Results);} Self.container = d.container [0]; ("# Osx-modal-content", self.container) Show ($) (' div # osx-modal-title ') .html ("send e-mail"); var title = $ ("# osx-modal-title", self.container); Title.show (); D.container.slideDown ('slow', function) () {setTimeout (function () {Var h = $ ("# osx-modal-data", self.container) .ight () + title.height () + 20; // padding d.container.animate ({height: h}, 200, function () {$ ("Div.close", self.container) .show (); $ ("# osx-modal-data" , Self.container) .show ();})}}, 300);}); }), Close: function (d) {var self = this; D.container.animate ({top: "++ (d.container.height () + 20)}, 500, function () {self.close (); // or $ .modal.close ();}) ;}, Show: function (d) {var self = this; $ ("#TxtEmail", selfcontainer) .hide ();});}};});  

I'm trying to hide the txtEmail box on the show function, but it does not seem that is to find it.

The dialog that is going on

   gt; & gt; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http: // Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;;;;;;; gt; html xmlns = "http: //www.w3.or  Gt; & lt; div & gt; & lt; p & gt; & lt; input id = "txtEmail" type = "text" style = "width: 90%" /> & lt; / p & gt; & Lt; p & gt; Textarea id = "TextArea1" cols = "20" rows = "5" & gt; & Lt; / Textarea & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; Input id = "deposamsg" type = "submit" value = "send" /> & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Can anyone help me on this?

Thank you,

I believe that the AJAX call has show < / Code> method is not implemented and thus the element is not present when you are going to hide it. You should move all the code after the AJAX call in the open handler in the AJAX callback, along with the code to hide the txtEmail element.

var OSX = {container: tap, open: function (D) {var itself = this; $ Expect an HTML response: function (html) {$ ('div # Osx-modal-data') Ajax ($ url / /,, type: 'GET', datatype: 'html', // & lt; .html (results) .Finded ("#txtEmail") .hide () ... ... the rest of the code to display the dialog ...}});

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -