Click here to Skip to main content
14,392,692 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Team

I have created a button using bootstrap for customization and with Javascript using Post as a protocol to send data back to TalkBack app in ThinkSpeak. My functionality does not seem to work and need some help to rework on my code.

What I have tried:

HTML code ;
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"><br/>
  
<div class="col-md-4 text-center"> 
    <button id="singlebutton" name="singlebutton" class="btn btn-primary">Talk-Back</button> 
</div>


Javascript code;

<script type="text/javascript">
 $(document).ready(function(){
    $("#boot .btn").click(function(){
    	$(this).button('Talk-Back');
    });
   $.post('https://api.thingspeak.com/talkbacks/35730/commands.json?apikey=[JJHHMMITZ2TAK9PU]&position=1');
});
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
Posted
Updated 3-Nov-19 22:56pm
v2
Comments
Richard MacCutchan 4-Nov-19 3:52am
   
"need some help"
Sorry but we cannot guess what help you are looking for. Please edit your question and explain exactly what the problem is.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100