Announcement

Collapse
No announcement yet.

New to using JSON need some help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • alexbk66
    replied
    Originally posted by wkrasner View Post
    I am sucessfully sending json string and controlling devices

    My html code is as follows:
    Code:
    <input type="button" CLASS="BUTTON7" onclick="window.open('http://192.168.86.49/json?request=controldevicebyvalue&ref=115&value=255'); return false;" value="Bed" />
    What I am looking to accomplish is post the json string , but instead on opening a new window after the post i want to refresh the orgin web page. Any thoughts? Thanks
    Instead of window.open you should use window.location = url;

    But I think is you want to stay on the same page - you will have to use ajax

    Leave a comment:


  • wkrasner
    replied
    I am sucessfully sending json string and controlling devices

    My html code is as follows:
    Code:
    <input type="button"  CLASS="BUTTON7" onclick="window.open('http://192.168.86.49/json?request=controldevicebyvalue&ref=115&value=255'); return false;" value="Bed" />
    What I am looking to accomplish is post the json string , but instead on opening a new window after the post i want to refresh the orgin web page. Any thoughts? Thanks

    Leave a comment:


  • wkrasner
    replied
    Thanks Alex, that worked

    Leave a comment:


  • alexbk66
    replied
    Should it be
    192.168.1.83/json?request=controldevicebyvalue&ref=415&value=100 ?

    Leave a comment:


  • wkrasner
    started a topic New to using JSON need some help

    New to using JSON need some help

    Hi
    Searched around but couldn't find an answer. Any help would be appreciated.

    I am posting the following json post and I am getting a time out an error. JSON is checked off in setup.

    http://192.168.xx.xx:xxxx/JSON?ref=1291&value=255

    I get a time out error, Any thoughts?

    Thanks
Working...
X