387 Topics

Member Avatar for
Member Avatar for blivori

Hi, Can anyone tell me why no 'products' are being displayed from the JSON file? This is my code: products.html: <!DOCTYPE html> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding"> <style>img{ height: 100px; float: left; }</style> <link rel="stylesheet" type="text/css" href="style.css"> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script> $.getJSON('products.json', function(data) { $.each(data.products, function(i, item) { …

Member Avatar for pritaeas
0
359
Member Avatar for erum

Hi to all .. can any one tell me how to connect json /webserive using .ascx control (use control) .. on button click i want to get data from database

Member Avatar for erum
0
139
Member Avatar for spowel4

Using this example json file: { "stores": [ { "storeName":"AUGUSTA", "company":"CC", "emailAddresses": ["spowel4@gmail.com", "spowel4@yahoo.com", "steve@compsysplus.com"] }, { "storeName":"CHATTANOOGA", "company":"CC", "emailAddresses": ["spowel4@gmail.com"] } ] } I have this code to try to parse the file: public static void main(final String[] args) throws Exception { // TODO code application logic here ObjectMapper …

Member Avatar for spowel4
0
9K
Member Avatar for mohammad.khasawneh.12
Member Avatar for ChrisXL

Hey everyone. Got a problem that I really need help solving. I have a page where a user is able to search a database for certain criteria (species/location/dates etc). What I have so far is when the form is submitted, the values are posted to a PHP script, which performs …

Member Avatar for pritaeas
0
313
Member Avatar for akvarel1

Hello again I am trying to show the errors that can occur by uploading a file (file name, size). I tried to modify this code cut-off but I could not. else format.html { render action: "new" } format.json { render json: @upload.errors, status: :unprocessable_entity } end I have following validations …

Member Avatar for LastMitch
0
164
Member Avatar for akvarel1

Hello! I try to catch a validation message with a `$.parseJSON(xhr.responseText).errors` but an allert message hows me "undefined" and I dont understand why. hier are my validations: validates :upload_file_name, :presence => true, :format =>{:with => %r{\.(pdf)$}i,:message =>"It should be a pdf File"} validates_uniqueness_of :upload_file_name, :message => "blabla" validates :upload_file_size, :inclusion …

Member Avatar for LastMitch
0
180
Member Avatar for Boniface Mutind

I have this json data and would like to convert to xml with php.. [themes] => Array ( [theme] => Array ( [0] => Array ( [name] => dasdasd [filename] => dasdasd [isDefault] => 0 ) [1] => Array ( [name] => dasdasd [filename] => dasdasd [isDefault] => 1 ) …

0
99
Member Avatar for Mike Askew

Been playing with the API a fair bit now in terms of writing a C# port of it. I tend to convert everything returned in JSON to an XmlDocument before manipulating it (Simply because I don't actually know how else to handle it within C#) However if I run any …

Member Avatar for diafol
0
275
Member Avatar for Dani

I have an API that supports both JSON and JSONP. Obviously, being a data provider, I want the people who request my data to cache it. However, jQuery's $.ajax() function says the following about their caching feature: >cache (default: true, false for dataType 'script' and 'jsonp') Type: Boolean If set …

Member Avatar for Dani
0
433
Member Avatar for pucivogel

How do i reference to a folder? I'm want the photos in folder 'gallery1' to be shown when i click on it, this htm code is in the same directory with folder gallery1 i've done this: <a href="gallery1" onclick="return false" onmousedown="ajax_json_gallery('gallery1')">Gallery 1</a><br> but nothing shows when i click on it

Member Avatar for stbuchok
0
244
Member Avatar for yaragalla_mural

i have to display a combo box with some dynamic values that comes from the database when user checked a checkbox on the currently being viewed html page. I am getting dynamic values from the webserver as json or xml. Now i have take the values from the json or …

Member Avatar for riahc3
0
108
Member Avatar for pucivogel

Can anyone explain me better the conpcept of the webservice. I'm using wamp for a school project, i'm creating an adress-book with JSON and AJAX. The Deitel's one if you have encounteered it before. I have the deitel's code and simply want to implement it in my website. It's requesting …

Member Avatar for gon1387
0
236
Member Avatar for welshly_2010

i am having problem filling a selection box with json data. here my php code <script src="jquery.js"></script> <script src="jquery.jCombo.js"></script> <style type="text/css"> </style> <?php $directory = opendir("C:/xampp/htdocs/xml"); $storeFilesIntoArray[] = "please select XML to load"; while (($fileName = readdir($directory)) !== false) { $getLastFourDigitsOfFile = substr($fileName,-4); if($getLastFourDigitsOfFile == ".xml") { #echo "filename is …

Member Avatar for gon1387
0
190
Member Avatar for welshly_2010

i cant seem to get my json data into a selection box. here my code for the dropdown.php </head> <script src="jquery.js"></script> <script src="jquery.jCombo.js"></script> <style type="text/css"> </style> <?php $directory = opendir("C:/xampp/htdocs/SE3S604CW3/xml"); $storeFilesIntoArray[] = "please select XML to load"; while (($fileName = readdir($directory)) !== false) { $getLastFourDigitsOfFile = substr($fileName,-4); if($getLastFourDigitsOfFile == ".xml") …

Member Avatar for LastMitch
0
125
Member Avatar for brenton_77

Hi All, I've hit a brick wall trying to get the jquery autocomplete to work correctly. The problem is with the .php file and the way the While loop works, as what it does is create a array for every name rather than one single array. I've tried to move …

Member Avatar for brenton_77
0
331
Member Avatar for pln89

I need to use a kendo slider which is a compenent of kendo ui framework. This slider must display date ranges.I have to show data from database based on this range.How can I achieve this?

Member Avatar for stbuchok
0
188
Member Avatar for jakizak

Hi everyone, Let me first explain the idea: I have a JSON document which has the following structure: { "timeline": { "headline":"Example Content", "type":"default", "text":"Example Content", "startDate":"2013,1,1", "endDate":"2013,1,28", "date": [ { "startDate":"2013,1,10", "headline":"Example Content", "text":"Example Content", "asset": { "media":"Example Content", "credit":"", "caption":"" } }, { "startDate":"2013,1,14", "headline":"Example Content", "text":"Example Content", …

Member Avatar for AleMonteiro
1
160
Member Avatar for pln89

I have question about json data. I can convert data from database to json data in asp.net web service but they come with xml tags. I need to remove string tags and xml information from this data. The appearance of the data is : <?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://tempuri.org/"> …

Member Avatar for AleMonteiro
0
219
Member Avatar for pln89

Hi, I am trying to develop an application with pie chart by using kendo ui framework. I created a datasource which type is json, but I need convert it to javascript array to draw the chart. my code is: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="View.aspx.cs" Inherits="JsonTest.View" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> …

Member Avatar for gon1387
0
3K
Member Avatar for brave_demo

<?php //email signup ajax call if($_GET['action'] == 'signup'){ mysql_connect('localhost','root',''); mysql_select_db('newsletter'); //sanitize data $email = mysql_real_escape_string($_POST['signup-email']); //validate email address - check if input was empty if(empty($email)){ $status = "error"; $message = "You did not enter an email address!"; } else if(!preg_match('/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/', $email)){ //validate email address - check if is a valid …

Member Avatar for brave_demo
0
416
Member Avatar for smepperson

Hi, I have the following code for a potential handlbars.js tmpl. It compiles correctly at tryhandlebarsjs.com however when I attempt to open the file independently in a browser the default text in the div is the only thing that renders. I know my .json call is wrong but I cannot …

Member Avatar for smepperson
0
426
Member Avatar for BrackishWater

How do I configure the date format independently for each of my date fields? For example, let's say I have a CustomerOrder class with more than 1 java.util.Date fields in it. I need to be able to render like this: <customerOrder> <orderDate>2013-01-04T20:50:42.769Z</orderDate> <user>Bob</user> <state>CO</state> <estShipDate>2013-01-04</estShipDate> </customerOrder> So one of the …

Member Avatar for BrackishWater
0
182
Member Avatar for aldm

Hi, is there any API for historical dates on web that returns data in xml or json format. For example, I need to get importants events in history on todays day and show that events in my app. Is there any good place to do it? And if you know …

Member Avatar for pritaeas
0
232
Member Avatar for eburlea

Hi all. I have 2 pages: 1. that provides data from mysql in json encoding if a correct "key" is provided, in my case the "key" sent by method post should be "1". Link: http://semaffiliate.local/public/api/getemployees Code in Zend: public function getemployeesAction() { $key = $this->getRequest()->getPost('key'); if (isset($key)) { if ($key …

Member Avatar for eburlea
0
347
Member Avatar for eburlea

Hi all. I am a beginner in Zend and I am wondering if there is any good book or tutorial for developing applications with Zend Framework, using json for data encoding and decoding and how to use jquery with Zend. Thanks.

Member Avatar for eburlea
0
237
Member Avatar for adishardis

Hi, I've been searching now for the better part of the weekend but I can't get this to work :-/ I want to use Highcharts pie chart to display data from my mysql table. I want to count the column 'Types' occurences of the different Types in that column. Each …

Member Avatar for adishardis
0
150
Member Avatar for adishardis

Hi, I have a json_encoded array that comes out like this `{"y":33,"customTooltip":"BOK"},{"y":61,"customTooltip":"DRFlytt"},`... I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this `{y:33,customTooltip:'BOK'},{y:61,customTooltip:'DR'},` Is this possible or should I find another approach? I derive the array like …

Member Avatar for adishardis
0
134
Member Avatar for AleMonteiro

Hi everybody. I'm building an site that will load a bunch of overlays into Google Maps. The overlays are static and already in JSON format to be loaded with AJAX. This all works fine, ajax request, json parse, adding overlay. But the json files are quite big, the largest has …

Member Avatar for AleMonteiro
0
2K
Member Avatar for manivannan.ajith

The End.