Note that there are some explanatory texts on larger screens.

plurals
  1. POLoading data through Jquery ajax for datagrid?
    primarykey
    data
    text
    <p>I have this code snippet(not complete though, ignore the ending script tag) ::</p> <pre><code>&lt;script type="text/javascript"&gt; function gotoa(){ var h = $.get("http://localhost:8080/2_8_2012/jsp/GetJson.jsp", function(result) { }); alert(result); var myVar= h; var storedata={ identifier:"ID", label:"name", items: myVar }; var store = new dojo.data.ItemFileWriteStore({data: storedata}); </code></pre> <p>The code for GetJson.jsp is :: </p> <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt; &lt;%@ page import="MyPackage.PopulateTextbox" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt; &lt;title&gt;Insert title here&lt;/title&gt; &lt;% String temp1; PopulateTextbox obj = new PopulateTextbox(); temp1 = obj.method(); %&gt; &lt;%=temp1 %&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I have a j query get method . And the URL i am passing in it returns me an Json array string. Output of URL :: </p> <pre><code>[{"ID":1,"Names":"Shantanu","Email":"shantanu.tomar@gmail.com"},{"ID":2,"Names":"Mayur","Email":"mayur.sharma@gmail.com"},{"ID":3,"Names":"Rohit"},{"ID":4,"Names":"Jasdeep"},{"ID":5,"Names":"Rakesh","Email":"rakesh.shukla@gmail.com"},{"ID":6,"Names":"Divyanshu"},{"ID":8,"Names":"hello"},{"ID":9,"Names":"fine"},{"ID":10,"Names":"shivani"}] </code></pre> <p>Now i want this output for my Data grid i.e i want that var myVar should get this value and then it will be passed on to dojo.data.ItemFileWriteStore. I am unable to do so . Please help ? Thanks. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload