Problem Inserting to Icenium Everlive

2 posts, 0 answers
  1. Jason
    Jason avatar
    1 posts
    Member since:
    Sep 2011

    Posted 18 Nov 2013 Link to this post

    I'm pretty new to javascript and Icenium, and have run into an issue with an app I'm putting together.
    When I try to insert an entry into my "locations" table, I get an Error
    "Uncaught TypeError: Converting circular structure to JSON' from http://local/Simulator/scripts/lib/everlive.all.min.js:45"

    I'm sure it's something simple that I'm just doing wrong, but haven't been able to track it down yet.
    I dropped the related code into the link below.

  2. Ivan Pelovski
    Ivan Pelovski avatar
    16 posts

    Posted 19 Nov 2013 Link to this post


    The problem is that you are assigning jQuery objects to the fields of the new data item. These objects contain references to themselves and that's why JSON.stringify cannot convert them to strings. What you need is the value of the HTML elements wrapped by the jQuery objects:
    $name = $('#name').val();
    Try this and let us know if it worked.

    Ivan Pelovski
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top