or
Hi
How do I pass a value from the button .content
@(Html.Kendo().Button()
.Name("p14")
.HtmlAttributes(new { type = "button" })
.Content("135")
.Events(ev => ev.Click("onClickPol")))
<script>
function onClickPol(e) {
//This dos not work, I want to retrieve the name, content of that button what n this case is 135
var xContent = $(e.event.target).closest(".k-button").attr("textContent")
}
</script>
@{
if (@Model.IsClinicalAlert) {
@(Html.Kendo().Button()
.Name("redalertbutton")
.ImageUrl(Url.Content("~/img/patient_alert_red.bmp"))
.HtmlAttributes(new { type = "button" })
.Events(ev => ev.Click("onAlertClick")))
} else {
@(Html.Kendo().Button()
.Name("greenalertbutton")
.ImageUrl(Url.Content("~/img/patient_alert_green.bmp"))
.HtmlAttributes(new { type = "button" })
.Events(ev => ev.Click("onAlertClick")))
}
}
<
script
>
$(document).ready(function () {
if ($@Model.IsClinicalAlert) {
alert(@Model.ClinicalAlert);
var wdw = $("#alertWindow").data("kendoWindow");
wdw.open();
}
});
function onAlertClick(e) {
var wdw = $("#alertWindow").data("kendoWindow");
wdw.open();
}
</
script
>
@(Html.Kendo().Window()
.Name("alertWindow")
.Title("Clinical Alert")
.Content(@<
text
><
strong
>@Model.ClinicalAlert</
strong
></
text
>)
.Draggable()
.Resizable()
.Width(400)
.Modal(true)
.Visible(false)
.Position(settings => settings.Top(150).Left(250)))