-1
votes
0answers
16 views

TreeView generated from database [closed]

I am using http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/index.htm#demos/jqxtree/treebindingtojson.htm treeview control in my website. Problem is that my treeview is too large. That's why ...
0
votes
1answer
35 views

Is there a better way to read json in node

I have this view that populates an unordered list from values in a json file. I am doing this in node. So is there a better way to do this, or a mode 'node-like' way? Can I load the json file without ...
3
votes
1answer
66 views

JavaScript object to JSON

Since I didn't find a way to properly transform JavaScript object to JSON with PHP, I wrote a snippet. Lets assume the following excerpt from Google Fonts JavaScript API: WebFontConfig = { ...
2
votes
1answer
76 views

Most efficient way to insert into ordered sequence

I have a dashboard like interface, that can have many tabs. There can be as many or as few tabs as the user likes, with the user being allowed to re order them as they wish. Exactly like browsers do. ...
2
votes
1answer
83 views

JSON schema validator

I wrote a simple JSON schema validator. The full code is over here on gist.github.com However, the code without comment is... validate = function(schema, instance) { var i; var errors = 0; ...
1
vote
0answers
96 views

How to optimize this algorithm? (solving systems of linear equations)

I am working on a programming challenge described here: http://www.enigmagroup.org/missions/programming/9/ Basically, you have a 6x6 table where the first 5 columns and rows are comprised of ...
0
votes
1answer
55 views

Can this iterating javascript code be optimized?

Say I have this type of code I'd like to execute. There's some data encapsulated around a big Javascript object containing methods & properties that I'd like to extract based on comparing some ...
1
vote
1answer
66 views

Improving localStorage functions

As part of a larger web app we are producing, I was asked to help build functionality to tie a page's shopping cart into localStorage for persistency. What follows are the three functions that I wrote ...
-1
votes
1answer
82 views

Why I need to use 2 functions, but not only one [closed]

I paste all of my code because it might have a connection with the function I am asking for. I had some problems with my parseJSON() function and someone helped me to make it work. Now I don't know ...
3
votes
2answers
149 views

Better way to return data via AJAX?

Let's say I have three files: a page that is used for searching data called search, a file that handles requests called controller, and a file that has functions which the controller calls based on ...
5
votes
0answers
177 views

My PHP AJAX bridge to jQuery library

I've been working on this library for 2 years now and using on many websites with great success. And I decided to make it public, I can assure this is the best jQuery <=> PHP bridge library there ...
3
votes
1answer
192 views

JQuery Promise Interface for a (very) simple JSON Parser

I have written a parser function that returns a JQuery Promise. You can see from the code that this is the top level parser and it delegates out to two other more specific parsers. At the minute it ...
5
votes
2answers
2k views

jQuery plugin $(node).toJSON() - convert html form to JS Object

GitHub project repo I've been working on this little function to convert an HTML form into a JSON Object having the same structure of the form. Basically it is intended to be useful in those ...
2
votes
2answers
271 views

Convert JSON to a different format (nested json)

This is really not a question. I was looking up this solution but couldn't find it anywhere. Thought of posting it here so it may save someone's time. Here was my issue: I had a JSON coming from ...
2
votes
1answer
193 views

Loading a pseudo-class instance from JSON

Is there a better way to do this? function Person(name) { this._type='Person'; this.name=name; this.hello = function(){ alert('Hello '+this.name); }; } function ...

1 2
15 30 50 per page