Comments (4)
That solution works, thanks! Should be merged to the original branch.
Original comment by [email protected]
on 16 May 2014 at 1:53
from jquery-load-json.
[deleted comment]
from jquery-load-json.
How to use it if value is different then the list shown.
eg.
<option value='1'>USA</option>
<option value='2'>UK</option>
Original comment by [email protected]
on 25 May 2014 at 5:35
from jquery-load-json.
This solution doesn't work for me (jQuery Mobile), this do (tested).
case 'select-one':
$(element).val(value).attr('selected', true);
$(element).selectmenu('refresh', true);
break;
For the select-multiple
case 'select-multiple':
var values = value.constructor == Array ? value : [value];
for (var j = 0; j < values.length; j++) {
$(element).val(value[j]).attr('selected', true);
}
$(element).selectmenu('refresh', true);
break;
Original comment by [email protected]
on 18 Jan 2015 at 8:57
from jquery-load-json.
Related Issues (20)
- JSON Array response for multiple input elements causes incorrect GET HOT 1
- Issue with multiple checkboxes and textarea fixed
- ID Length
- Can we edit the data coming from the server and then display it in the field ?
- Input type color is not getting updated from json data using loadjson HOT 4
- No longer works. At all. HOT 2
- Input text type= 'date' or type='time' doesn't work (solution)
- select option not giving desired result HOT 1
- Values from nested json not reflected properly.
- Patch for /trunk/scripts/jquery.loadJSON.js
- Unique selectors HOT 2
- loading json object returned from database into html form
- New live repo at https://github.com/kevindb/jquery-load-json
- Problem with Hierarchical JSON objects - variable scope issue causing duplication of parent data HOT 2
- JSLint not supported
- Checkbox issue HOT 1
- Patch for /trunk/scripts/jquery.loadJSON.js
- Patch for jquery.loadJSON.js version 1.2.5. HOT 2
- Textareas that contain the Enter key display blanks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-load-json.