Jump to content

Search the Community

Showing results for tags 'JSON'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. Hi All, So I am having some trouble implementing Java/JSON onto my WordPress site. However, being self taught in HTML I am not as knowledgeable as this community, and W3schools is always my go to site. I have been given some brief instructions and 'codes/scripts' that will allow me to show an automatic feed from my partner. However, I cannot seem to get my head around how it is done. The instructions say to add some code to the header of the page, but when this is done and the rest of the instructions followed (to the best of my knowledge) there is nothing displayed. I have s
  2. Hi ! On of the tutorial pages https://www.w3schools.com/js/js_json_html.asp is missing code of php file. As I understand the code should be the same as on previous page of chapter, like: <?php $myObj->name = "John"; $myObj->age = 30; $myObj->city = "New York"; $myJSON = json_encode($myObj); echo $myJSON; ?> Sincerely, Alejandro.
  3. Attention: W3Schools.com forum members: The following ".json" data file is used in conjunction with an AJAX ( Asynchronous Javascript And XML ) file to print a Bible verse to my web page: {"book": "Deuteronomy", "chapter": "4", "verse": "<p><sup><b>20</b></sup>&#8202But the L<font size="2">ORD</font> has taken you and <sup><i>c</i></sup>&#8202brought you out of the iron furnace,<br> out of &#8201Egypt, <sup><i>d</i></sup>&#8202to be a people of his own inheritance, as y
  4. I have 3 files: html that is displaying data from json file using AngularJS, json file containing the data, script.js that stores the scripts. HTML file also has a form, from which I want to add data to my json file (onsubmit="insertData()"). insertData function is going to be in script.js I know, I may use .push method for this, but I don't know how to apply to the json file in this case. script.js var prg = angular.module('ajsprogram', []); prg.controller("outercont", function($scope, $http) { //function to display json file information $http.get('airlines
  5. DILEMMA: I have a fairly complex JSON object that is introduced via an AJAX call. Unfortunately, my control panel tells me that it is undefined. Is this because it has no value? Or, is it because I do not know how to read the value properly? {"lastVisits"[{"firstVisit":{"prettyDate":"Monday, May 14, 2018"}}]} The name of the variable into which it is read is visitor_data. Am I reading the value of correctly? visitor_data.lastVisits[0].firstVisit.prettyDate Roddy
  6. I've built a static site with over 40,000 pages using Jekyll. I am trying to implement a live search into it without a database. I tried the w3schools live search example with a xml file I created from my site. It is very slow. Does anyone know of a faster way to parse xml files or am I wasting time. I enabled gzip compression on the entire site also, What would be the fastest way to search a lot of records and return a result? Thanks in advance.
  7. Hi, I've read the json tutorial on w3 website, and just have one question which makes a huge difference in the way I create the layout of my json file. All the examples they gave had a very short json file to read, but how does a json file look when you're trying to read many records. Does each httpRequest read the whole file from one first '{' to the last '}' and that's it. Or, if there are several, {'s will it return each one as an object. It was unclear to me from the tutorials. Specifically, If I had a database with 10 records and 5 fields in each, would I do this: { "name1" :
  8. function loadDoc(n_file) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var myObj = JSON.parse(this.responseText); var parametr = "september" var neco = myObj.september.17[0].dayname; var neco2 = "myObj." + parametr + ".17[0].dayname"; debugger; x = zacinajiciDen(neco); than i have this in my variables: neco1: "pa" neco2: "myObj.september17[0].dayname" i would like to have value "pa" inside like in neco1 but i would like to be able to change name of month. Is
  9. Dear W3Schools-Community, There is something not working with my code right here. It should be mentioned that I am fairly new to using JavaScript. Here is my HTML code (stripped down to the essential parts): <!DOCTYPE html> <html lang="de"> <head> <script type="text/javascript"> function change_content(contentname) { if (document.getElementById(contentname).className = 'notactive') { document.getElementById('login').className = 'notactive'; document.getElementById('news').className = 'notactive'; document.getElementById('info').classNa
  10. Hello, I want to do a countdown and put it in my website. I did a countdown but I have a problem, when I launch it, the seconds are freezing they are not anymore running... So the countdown is not in realtime anymore... I have to refresh in order to see the countdown running. Here is what I did: <div id="after"> <span id="dhour"></span>:<span id="dmin"></span>:<span id="dsec"></span> </div> <div id="count2">Texte à afficher</div> <div class="numbers" id="dday" hidden="true"></div> <script> var ladate = new
  11. consider this is my json array [ {"products":[{"productname":"Online Test","product":[{"subjectname":"Quants","lessonid":"16","subjectid":null,"subject_covered":"Algebra for SSC","lesson":"15","videoflag":false,"videos":null,"quiz":[{"practice":[{"title":"15.0 - Test of Quantitative Aptitude: Algebra for SSC : Lesson 15.0 ","nid":"21712","quizid":null}],"combo":null,"mock":null}],"ebook":null},{"subjectname":"Quants","lessonid":"17","subjectid":null,"subject_covered":"Trigonometry for SSC","lesson":"16","videoflag":false,"videos":[],"quiz":[{"practice":[{"title":"16.0- Test of Quantitativ
  12. Hi, I'm trying to follow the JSON example at http://www.w3schools.com/json/json_example.asp I have adjusted the code a little but the code is as follows: jsonTest.html <!DOCTYPE html> <html> <head> <style> h1 { border-bottom: 3px solid #cc9900; color: #996600; font-size: 30px; } table, th , td { border: 1px solid grey; border-collapse: collapse; padding: 5px; } table tr:nth-child(odd) { background-color: #f1f1f1; } table tr:nth-child(even) { background-color: #ffffff; } </style> </head> <body> <h1>Customers</h1> <div id="
  13. Hello All, I am stuck trying to filter results of a json response. I have a sample json response: [ { "id":0, "commentText":"Test", "createdBy":"User1", "isImportant":false }, { "id":1, "commentText":"Hello World", "createdBy":"User2", "isImportant":true }, { "id":2, "commentText":"Testing", "createdBy":"User2", "isImportant":false }, { "id":3, "commentText":"This is another one", "createdBy":"User2", "isImportant":true }, { "id":4, "commentText":"Hello World!", "createdBy":"User2", "isI
  14. I made an ajax call in my project, the call return a json object, i can see the json object in my console but when ever i call the w3DisplayDate() I get this error in my console " w3data.js:30 Uncaught TypeError: Cannot read property 'insertBefore' of null ". Is this a bug or am I doing something wrong, someone please help.
  15. im trying to output a json file to an expandable tree using html and jquery. its working, but the nesting and nodes within the tree are misplaced. any idea what that is? for example. mainstation 2 is coming out as a child of mainstation 1, while they should be siblings. it should be a logic error html code:<!DOCTYPE html><html> <head> <meta charset="UTF-8" /> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $.ajax({ url:
  16. Bootstrap sounds a bit like a finished optional program to use? also It seemed like when I first started seeing this page I have been learning from, that it is trying to "sell me" on the HTML5 as a good new and easier way to think of html code I wonder if this stuff has any merit? is it true? Is there any particular Web and computer code language *(scripting etc,) that are universal, or more functional for a different similar type? like for example I have read that someone wrote "there personal favorite scripting is" and similar quoted. Is there any that are not liked or favored by ma
  17. Hello everyone!I need your help.I have this code: @BuildTreeView(treeView, IdCategoriaParente) @helper BuildTreeView(IEnumerable<dynamic> data, int catfiglia, int? idcategoriaparente = 1, int level = 0, string accumulatore = ""){ // // var selectRecord = ""; var nodes = data.Where(n => n.IdCategoriaParente == idcategoriaparente).OrderBy(n => n.Id); var separatore = ""; if (nodes.Any()) { if (nodes.First().IdCategoriaParente != null) { if (level > 0) { separatore = " >> "; } }
  18. Good day everyone, Do you have a Google Translate script, as much as possible a URL, that returns a JSON format? For example I pass this URL using an AJAX request: https://google-translate-api-domain.com/q=large〈=english&to=afrikaans maybe it will return: {"translation":"groot"} Thanks in advance! - Regicide Del Feroz
  19. I desperately need to get some simple data from a file into a table on a web page. I've been pointed to using JSON, but I'm not getting something(s) correct with implementation. I'm not sure what I'm doing wrong and I've spent hours on the task. I'm not a developer, but I can follow instructions. Any help will be greatly appreciated. Here is what I have set up: A simple web page. The code is pasted below. A simple JSON file (new.json). It is in the same path as the web page (C:xampphtdocsxamppaudit). The file's contents are pasted below. I'm running XAMPP as my server. Only Apache is
  20. Ok, Hi everyone. I found this awesome and simplistic shopping cart on codepen.com BUT I do not know how to make it work .... :(TO begin with here is the link for it: http://codepen.io/bartveneman/details/KHxLGI am using Dreamweaver to make my website. So I copied it all, made sure that the links between my html, css and js are working fine and it still does not work. My problem with it is as follows: I did a copy+paste on it cannot shows me the cart without any items. I do not know how to add items without ruining the JS which will calculate things like total price, subtotal, etc. Things tha
  21. <?php$salename=json_encode($oSales);?> I need pass variable in php script to javaScript code in series <script type="text/javascript"> $(function () {$('#lineChartSales').highcharts({chart: {type: 'line'},title: {text: 'Monthly Average Sales'},xAxis: {categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']},yAxis: {title: {text: 'Temperature (°C)'}},plotOptions: {line: {dataLabels: {enabled: true},enableMouseTracking: true}},series: [{name:a,data: [1, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]},{name: b,data: [3.9, 4.2
  22. Hello, I have a php web page that contains graphics, and I want to incorporate into this web page a drop-down list, selecting the year, we display the graphic that matches this year at the same page ... I created the drop-down list in html but I know how to have when you click on an item in the drop-down list displays all my graphics in the same web page. here is the list that I created: <form name="test" method="post" action ="home.php"><select name="annee" onChange="this.form.submit()"> <option value="1"> 2009</option> <option value="2" >2010&
  23. Hi, I have this following code: http://jsfiddle.net/dustcomposer/bapwnhy0/ var cresc_path = '<path class="dyna_line" id="dyna_line" d="M ' + 0 + ' ' + 0 + ' L ' + 50 + ' ' + 25 + ' M ' + 0 + ' ' + 50 + ' L ' + 50 + ' ' + 25 + '" style="stroke-width: 1; stroke: red; fill:none;" />';var dl = document.createElementNS("http://www.w3.org/2000/svg", "svg");dl.setAttribute('class', 'dyHolder');dl.setAttribute('id', 'dyHolder');dl.setAttribute('style', 'border:1px solid red');dl.setAttribute('width', '50');dl.setAttribute('height', '50');dl.setAttributeNS("http://www.w3.org/2000/xmlns/", "
  24. Hi to all, i hope to find some help here. This is my problem, which need urgent help. Im working on a chrome extension, VERY VERY basic. My extension block a list of "urls" so i have 2 files for my chrome extension, my manifest.json and background.js Code of manifest.json: {"name":"Stop-it","description":"app","version":"1.0,"manifest_version":2,"permissions": ["webRequest","webRequestBlocking","unlimitedStorage"],"icons":{"48":"icon.png"},"background":{"scripts": ["background.js"]},"browser_action":{"default_popup":"popup.html","default_icon":"icon.png"}} and the code of
  25. I have been trying to develop my google places map. I found this page, https://developers.g...on/autocomplete which is what I think I want. I want to be able to search a specific word and return only results that I input. I am not sure how to link the JSON script to the XML. I need some help.
  • Create New...