or
<div id="login-popover" data-role="popover" data-popup='{ "height": "220", "width": "250" }' data-close="reset"> <div data-role="view" data-title="Login" data-model="logins" data-init="logins.popupinit" data-show="logins.popupshow"> <div id="login-wrapper" data-role="content">
<form id="login-form"> <input type="email" id="username" data-bind="value: info.username" placeholder="EMAIL"/> <input type="password" id="pwd" data-bind="value: info.password" placeholder="PASSWORD"/> <div> <span class="k-invalid-msg" data-for="username"></span> </div> <div> <a data-role="button" data-click="login">Login</a> <a data-role="button" data-click="register">Sign Up</a> </div> </form> </div> </div> </div>$("#login-popover").data("kendoMobilePopOver").open("#valid-element");$("#login-popover").data("kendoMobilePopOver").close();this.transition = new Transition({ axis: AXIS, movable: this.movable, onEnd: function() { that._transitioning = false; if (movable[AXIS] === 0) { element[0].style.cssText = ""; that.element.hide(); } }});public class Client{ [ScaffoldColumn(false)] public int Id { get; set; } [DisplayName("Name")] [Required] [StringLength(120)] public string Name { get; set; }
​ // etc...
public virtual Address Address { get; set; }
}
public class Address{ [ScaffoldColumn(false)] public int AddressId { get; set; } [DisplayName("Address")] [Required] [StringLength(200)] public string Street { get; set; } // etc... [ForeignKey("Client")] public int? Id { get; set; } public virtual Client Client { get; set; }}@using (Html.BeginForm("Create", "Client", FormMethod.Post, new Dictionary<string, object> { { "data-htci-target", "addressData" } })){ @Html.AntiForgeryToken() <div class="row"> @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" }) <div class="col-sm-4 col-md-4 col-lg-4"> @Html.Kendo().AutoCompleteFor(model => model.Name).HtmlAttributes(new { style = "width:100%" }) @Html.ValidationMessageFor(model => model.Name) </div> </div> @{ var vdd = new ViewDataDictionary(ViewData) { TemplateInfo = new TemplateInfo() { HtmlFieldPrefix = "Address" } };} @Html.Partial("_AddressPartial", Model.Address, @vdd) // yada yada...you can imagine the rest of the very standard view$(function() { var urlGeoIeoip = "http://ip-api.com/json/?callback=?"; $.ajax({ url: urlGeoIeoip, type: "GET", dataType: "json", timeout: 5000, success: function (geoipdata) { $.ajax({ url: "/getlocationdata/" + geoipdata.country + "/" + geoipdata.regionName + "/" + geoipdata.city, type: "GET", timeout: 5000, success: function (data) { //alert(data); //var $form = $(this); // var $target = $($form.attr("data-htci-target")); var $newHtml = $(data); //alert($target); $("#addressData").replaceWith($newHtml); $("#City").data("kendoComboBox").value(geoipdata.city); $("#State").data("kendoComboBox").value(geoipdata.regionName); $("#Country").data("kendoComboBox").value(geoipdata.country); } });}}).fail(function(xhr, status) { if (status === "timeout") { // log timeout here } });});