- Netduino Forums
- → Viewing Profile: Topics: n0rx0r
The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Community Stats
- Group Members
- Active Posts 3
- Profile Views 6142
- Member Title New Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
Neutral
User Tools
Friends
n0rx0r hasn't added any friends yet.
Topics I've Started
Is there a simple socket tutorial for netduino plus?
09 May 2011 - 03:07 PM
I got my netduino a couple weeks from now, now i really want to try the network capability from the netduino. I already worked on the webserver, which worked perfectly. I was wondering is there a good tutorial on sockets with send response?
Thank You
How can I capture the response from netduino plus?
09 May 2011 - 05:00 AM
I used the code here : Link
But I cannot display the response from netduino in ConsumeNetduino.html. Please help, i am really new in jQuery and Ajax.
Thank You
Here is the code from the html file:
But I cannot display the response from netduino in ConsumeNetduino.html. Please help, i am really new in jQuery and Ajax.
Thank You
Here is the code from the html file:
<html> <head> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/jquery-ui.min.js" type="text/javascript"></script> <script> $(function() { $( "#button1" ).button().click(buttonOn); $( "#button2" ).button().click(buttonOff); }); function NetRequest(cmd, param1, param2) { urlStr = "http://192.168.7.9/" + cmd + "/" + param1; if (param2 != undefined) urlStr += "/" + param2; //alert(urlStr); $.getJSON( urlStr, //function (result) { alert(result); alert(result.message); } function (result) { alert(result.message); } ); /* $.ajax({ url: urlStr, success: function() { alert("success"); }, complete: function(XMLHttpRequest, textStatus) { completeProc(XMLHttpRequest.responseText) }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("Error"); }, dataType: 'html' }); */ } function completeProc(responseText) { alert("in completeProc: '" + responseText + "'"); $("#response").html( responseText ); } function buttonOn() { NetRequest("led", 1, 0); } function buttonOff() { NetRequest("led", 0, 0); } </script> </head> <body> <p><button id="button1">On</button> <button id="button2">Off</button></p> <div id="response"></div> </body> </html>
- Netduino Forums
- → Viewing Profile: Topics: n0rx0r
- Privacy Policy