Created
December 21, 2016 01:44
-
-
Save seco/dbf6d0b006f823f5ce9eb50bc92cc2bd to your computer and use it in GitHub Desktop.
Blynk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blynk Web Dashboard | |
------ | |
A [Pen](http://codepen.io/shrikantgg/pen/oYgoxm) by [shrikant](http://codepen.io/shrikantgg) on [CodePen](http://codepen.io/). | |
[License](http://codepen.io/shrikantgg/pen/oYgoxm/license). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="navbar navbar-inverse"> | |
<div class="container-fluid"> | |
<div class="navbar-header"> | |
<a class="navbar-brand" href="#">Blynk</a> | |
</div> | |
</div> | |
</nav> | |
<div class="container"> | |
<div class="col-lg-2"><legend>Enter The Token</legend></div> | |
<div class="col-lg-5"><input class="form-control" id="focusedInput" type="text"></div> | |
<div class="col-lg-5"> <button id="sub" class="btn btn-primary">Submit</button></div> | |
</div> | |
<br> | |
<div class="container"> | |
<div class="panel panel-success"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">Project Information</h3> | |
</div> | |
<div class="panel-body"> | |
<div class="container"> | |
<div class="col-lg-3"><label>Project Name :</label></div> | |
<div class="col-lg-9"><label id="pn">------ </label></div> | |
<div class="col-lg-3"><label>Board Type :</label></div> | |
<div class="col-lg-9"><label id="bt">------</label></div> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("#sub").click(function(){ | |
var t =$('#focusedInput').val(); | |
var api = "http://blynk-cloud.com:8080/"+t+"/project"; | |
$.getJSON(api,function(data){ | |
var projectname =data.name; | |
var boardTyp = data.boardType; | |
$("#pn").html(projectname); | |
$("#bt").html(boardTyp); | |
}); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://bootswatch.com/flatly/bootstrap.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment