This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200: How implement a GET(token) function in an html page.

Other Parts Discussed in Thread: CC3200

Hello my Friends,

I pray you to help me!

I cannot understand for various days how implement a GET-token function in html to reflash only some text field on my page when I connect with my PC to CC3200(in Access Point mode). I can get all the token values when my page is loaded for the first time, but when I try to implement a function, similar to the POST function, I can reach any results. I have seen that there are some examples, like Out-Of-Box that implement a AJAX method with jquery API functions, but I don't understand how does they works, and where they send the token name (like __SL_G_UXX) and in what function...

Thanks a lot!!

Dario Patruno

  • Hi Dario,

    You can review how the GET Token is handled at the httpserver example program.

    - kel
  • Hi kel,
    I got started with my application from that example, but in that example the webpage get from the microcontroller the red led status only at loading. I want to get an information (a variable value) from the microcontroller when the page is already loaded, e.g., with a button pushing...
    Thank you!
    Dario
  • Hello!

    I too want the same solution, where I can post a dynamic variable from the CC3200 pin to the HTML page! Can someone help?
  • keep your GET token in separate html files like this 

    <html>
    <body>
    <p>__SL_G_UT1</p>
    <p>__SL_G_UT2</p>
    </body>
    </html>
    

    get this html file through AJAX GET request, and parse this token value from ajax response text

    simply, if you don't want to parse html tags to get these token values, insert json structured text in html file like this not html tags

    {"val":[__SL_G_UG1,__SL_G_UG2]}

    get this html file through AJAX GET request and use this javascript

    js =  JSON.parse(ajax.responsetext);

    js.val[0] to get __SL_G_UG1 token value