Search found 15 matches

Go to advanced search

by Tom Mccann
Sun Apr 20, 2014 1:17 am
Forum: Issues
Topic: How to parse array of objects in server scripting environment
Replies: 1
Views: 317
 
Jump to post

How to parse array of objects in server scripting environment

I need someone to answer this who knows about the server scripting environment. I have a server script that makes a successful query to the backend mongo database. The query brings back 2 documents as I expected. So far so good. If I try to use any of the usual methods to parse the results then the ...
by Tom Mccann
Sat Apr 19, 2014 8:45 pm
Forum: Issues
Topic: Using JSON and jQuery in server scripts
Replies: 4
Views: 485
 
Jump to post

Using JSON and jQuery in server scripts

Thank you. My follow up questions is why can't I use JSON.parse in a server script?

I'm using this line of code:

code
var obj = JSON.parse( result );
/code

I'm getting an exception with this message:

Unexpected token oncode: undefined

by Tom Mccann
Sat Apr 19, 2014 12:47 pm
Forum: Issues
Topic: Using JSON and jQuery in server scripts
Replies: 4
Views: 485
 
Jump to post

Using JSON and jQuery in server scripts

I'm trying to parse the result of a database query in a server script. The query works and the result comes back ok. code result.query = Collection.query(DB_id, "Product", params, token); console.log(result); /code The result variable that is returned from the query...
by Tom Mccann
Sat Mar 08, 2014 12:52 am
Forum: Issues
Topic: Getting the values in a list
Replies: 4
Views: 550
 
Jump to post

Getting the values in a list

I eventually settled on the jquery code: $("[name='label']").each(function () {... A bit of background. There is a Label control inside the List control. The Label is mapped to the text value that is returned by the REST service query. The label has the name 'label' (not very imaginative I...
by Tom Mccann
Fri Mar 07, 2014 10:11 pm
Forum: Issues
Topic: Getting the values in a list
Replies: 4
Views: 550
 
Jump to post

Getting the values in a list

The first thing I tried was mapping the database results returned via the REST query service. I mapped $ to a local storage variable called category1Data. When the page loaded, I looked for the local storage variable and there was nothing there. I had expected to see the JSON array of database recor...
by Tom Mccann
Fri Mar 07, 2014 9:30 pm
Forum: Issues
Topic: Getting the values in a list
Replies: 4
Views: 550
 
Jump to post

Getting the values in a list

I'm writing some code to work out if a value is in a list. The list is populated by a REST query to the database. I'm using a jquery selector on the class of the label within each list item. Then iterating the innerHTML to get the value. The code is: $('.label').each(function (){ if (this.innerHTML ...
by Tom Mccann
Tue Feb 25, 2014 9:59 pm
Forum: Issues
Topic: Sortable list not working on mobile device
Replies: 3
Views: 413
 
Jump to post

Sortable list not working on mobile device

I already know this example - I'm using the code from it. My question is: It works when I run Test in appery, but it doesn't work when the same app is on the Android device. Why is that?

by Tom Mccann
Tue Feb 25, 2014 8:03 pm
Forum: Issues
Topic: Sortable list not working on mobile device
Replies: 3
Views: 413
 
Jump to post

Sortable list not working on mobile device

I have added the jquery mobile js library to my app. I have made a list sortable (by drag and drop) by adding this code: $("#productList_menulist").sortable({ change: function(event, ui) { window.productListSorted = false; } }); $("#productList_menulist").disableSelection(); This...
by Tom Mccann
Sat Feb 22, 2014 1:46 am
Forum: Issues
Topic: serializing a form's contents
Replies: 1
Views: 252
 
Jump to post

serializing a form's contents

I'm trying to compare a form's values between when the document/form opens and when the user leaves - so that I can prompt the user to save. Can you tell me if it's possible to serialize the contents of the form? jQuery has a serialize function which is invoked on the form object. However, I looked ...
by Tom Mccann
Sun Jan 05, 2014 6:04 am
Forum: Issues
Topic: How to selectively prevent caching?
Replies: 5
Views: 778
 
Jump to post

How to selectively prevent caching?

On the Load event. On the list page, I set a localStorage variable with the id of the record. Then the rest service maps that to the ObjectId. Pretty standard technique.

Go to advanced search