The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Assuming we have the following JSON content in result.json file −{ "name": "Amy", "age" : "24", "sex": "female" }ExampleThe following is the code snippet showing the usage of this method − $(document).ready(function() { $("#driver").click(function(event){ $.getJSON('result.json', function(jd) { $('#stage').html(' Name: ' + jd.name + ''); $('#stage').append('Age : ' + jd.age+ ''); $('#stage').append(' Sex: ' + jd.sex+ ''); }); }); }); Click on the button to load result.html file: STAGE
The jQuery.getScript( url, [callback] ) method loads and executes a JavaScript file using an HTTP GET request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentcallback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Assuming we have following JavaScript content in result.js file −function CheckJS(){ alert("This is JavaScript"); }ExampleThe following is the code snippet showing the usage of this method − $(document).ready(function() { ... Read More
The serializeArray( ) method serializes all forms and form elements like the .serialize() method but returns a JSON data structure for you to work with.Assuming we have following PHP content in serialize.php file −ExampleThe following is an example showing the usage of this method −Live Demo The jQuery Example $(document).ready(function() { $("#driver").click(function(event){ ... Read More
To access values creates by serializeArray, use the serializeArray( ) method. The serializeArray( ) method serializes all forms and form elements like the .serialize() method but returns a JSON data structure for you to work with.Let’s say we have the following PHP content in serialize.php file −The following is an example showing the usage of this method −ExampleLive Demo The jQuery Example $(document).ready(function() { $("#driver").click(function(event){ ... Read More
To get value from serialized array, use th serializeArray( ) method. The serializeArray( ) method serializes all forms and form elements like the .serialize() method but returns a JSON data structure for you to work with.Let’s say we have the following PHP content in serialize.php file −The following is an example showing the usage of this method:ExampleLive Demo The jQuery Example $(document).ready(function() { $("#driver").click(function(event){ ... Read More
Let us first create a table. Following is the query to create a table in MySQL −mysql> create table DemoTable( Id int, Name varchar(30), CountryName varchar(30), Age int ); Query OK, 0 rows affected (0.66 sec)Following is the Java code to access MySQL database −import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; public class AccessMySQLDatabase { public static void main(String[] args) { Connection con = null; Statement st = null; try { con = DriverManager.getConnection("jdbc :mysql ://localhost :3306/web?" + "useSSL=false", "root", "123456"); ... Read More
The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Let’s say we have the following JSON content in result.json file −{ "name": "David", "age" : "25", "sex": "male" }The following is a code snippet showing the usage of ... Read More
To retrieve data from JSON file using jQuery and Ajax, use the jQuery.getJSON( url, [data], [callback] )The jQuery.getJSON( url, [data], [callback] ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Let’s say we have the following JSON content in result.json file −{ "name": "John", "age" : ... Read More
To load JSON data using jQuery, use the getJSON() and ajax() method. The jQuery.getJSON( ) method loads JSON data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be sent to the server.callback − This optional parameter represents a function to be executed whenever the data is loaded successfully.Add your JSON content in result.json file −{ "name": "Amit", "age" : "27", "sex": "male" }The following is a code snippet showing the ... Read More
Internal tables − Internal tables are a means of storing data in the fixed format in working memory of ABAP. The data is stored line by line. So it is necessary for the data to be in a fixed format. Generally, they are used to store data in database tables to be used in ABAP programs.Structures− Structures are basically data objects consisting of various components or fields of any data types. It differs from the tables in a way that it simulates the format of the table and is used to hold one row of data whereas table has multiple rows ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP