This is a migrated thread and some comments may be shown as answers.

Problem Inserting to Icenium Everlive

1 Answer 71 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason
Top achievements
Rank 1
Jason asked on 19 Nov 2013, 03:48 AM
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.

http://pastebin.com/gv0e01i1

Thanks!

1 Answer, 1 is accepted

Sort by
0
Ivan Pelovski
Telerik team
answered on 19 Nov 2013, 11:44 AM
Hello,

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.

Regards,
Ivan Pelovski
Telerik
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.
Tags
General Discussion
Asked by
Jason
Top achievements
Rank 1
Answers by
Ivan Pelovski
Telerik team
Share this question
or