You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.1 KiB
27 lines
1.1 KiB
<script>
|
|
$(function () {
|
|
$('#NodeId').change(function () {
|
|
var id = $(this).find(':selected').val();
|
|
update('@Url.Action("GetSceneJson", "Ajax")', id, "#SceneId");
|
|
update('@Url.Action("GetDeviceJson", "Ajax")', id, "#DeviceId");
|
|
update(null, null, "#ApiId");
|
|
$('#ajax').html('');
|
|
|
|
});
|
|
$('#DeviceId').change(function () {
|
|
var id = $(this).find(':selected').val();
|
|
update('@Url.Action("GetApiJson", "Ajax")', id, "#ApiId");
|
|
$('#ajax').html('');
|
|
});
|
|
$('#ApiId').change(function () {
|
|
var id = $(this).find(':selected').val();
|
|
$('#Url').parent().find('#ajax').html('');
|
|
var url = '@Url.Action("Api")?apiId=' + encodeURI(id) + '&deviceId=' + encodeURI($('#DeviceId').val());
|
|
$.get(url, function (html) {
|
|
$('#ajax').html(html);
|
|
reset();
|
|
});
|
|
|
|
});
|
|
});
|
|
</script> |