jquery,json,jquery-ajax,web-applications,phonegapRelated issues-Collection of common programming errors


  • MPD
    7 jquery admin-theme
    I have installed jQuery Update but it breaks some core functionality that makes the admin UI a struggle to deal with. Is there a way to keep jQuery Update enabled but disable it when the admin theme is visible?

  • Jamal
    jquery plugin twitter
    I’ve been working on a jQuery plugin for pulling tweets since the v1 endpoints were all closed off and you need oAuth now. This is just the jQuery part but if you want to see the php behind it I’ll be happy to post. But basically, I’d love suggestions, as this is one of the first real plugins i’ve made, i’m really looking for critique on patterns and efficiency. Is there anything I’m doing that can be shorten’d significantly? Is there a feature you think would be cool for me to include?And just

  • Jamal
    javascript jquery datetime plugin twitter
    I’ve built a Twitter plugin recently and was wondering if I could get some feedback on it. There is also a PHP side that grabs the actual tweets and I can post that code if it’s needed.http://jsfiddle.net/cKfDd/;(function ( $, window, document, undefined ) { /************************************* Plugin Functions *************************************/ /*************************************/ Plugin.prototype.init = function () {var params = [ ‘?user=’ + this.options.user,’&limit=’

  • laxman
    php jquery ajax wordpress woocommerce
    I am getting catchable fatal error in bellissima themeforest woocommerce theme.http://www.pursesgalore.com.au/ can anyone help on this?Code:if(!$dst_h) ://can’t resize, so return original url$img_url = $url;$dst_w = $orig_w;$dst_h = $orig_h;————————–line number 1040 ———————–else ://else check if cache existsif(file_exists($destfilename) && getimagesize($destfilename)) {$img_url = “{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}”;} Error: Catchable fatal erro

  • Fran Verona
    php javascript jquery ajax
    I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title

  • Tom
    jquery ajax joomla joomla2.5
    Still having problems figuring out how to use Ajax and the Joomla framework together. I’ve created a Joomla component which I can access with:index.php?option=com_mycomponentI’m using Jquery with Ajax in components/com_mycomponent/views/mycomponent/tmpl/default.php:<?php // No direct access to this file defined(‘_JEXEC’) or die(‘Restricted access’); ?> <html> <head><title>Ajax with jQuery Example</title><script language=”javascript” type=”text/javascript” src=”ht

  • Asenar
    javascript php jquery callback
    i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion

  • Ulker Ibrahimova
    javascript jquery file-get-contents
    This question already has an answer here:Ways to circumvent the same-origin policy11 answersIs there any way to get full page source of snother different site? Example my site is example.com but i want to get facebook’s page source on example.com. I tired this one: http://phpjs.org/functions/file_get_contents/ And it gives me null. So anyone knows it?function file_get_contents (url, flags, context, offset, maxLen) {// Read the entire file into a string//// version: 906.111// discuss at: http://

  • Mitesh Vora
    jquery html css ellipsis
    I tried looking here Insert ellipsis (…) into HTML tag if content too wide but could not get in chrome to work. I there solution for multiline in all browsers??

  • Ronald Yeung
    javascript jquery ajax json cors
    What I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp://www.example.com/index.phpTriggers a jQuery AJAX call tohttps://www.example.com/authenticate.php?user=123&password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.

  • user3313192
    java android json android-asynctask
    I’am building a app that connects to a remote sever through JSON in this case connecting to ‘localhost’. The current program i have written will open different UI depending on their ‘type’ i.e normal or admin. My logat and java are below: This is my Log cat data: 02-19 07:19:51.921: E/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1 02-19 07:19:51.921: E/AndroidRuntime(1707): Process: com.example.newjudoapp, PID: 1707 02-19 07:19:51.921: E/AndroidRuntime(1707): java.lang.RuntimeException: A

  • Siddesh Bhalke
    php json curl json-decode
    My json data{“total”: 533489,”page”: 1,”pagesize”: 30,”questions”: [{“tags”: [“php”,”html”,”forms”],”answer_count”: 6,”favorite_count”: 0,”question_timeline_url”: “/questions/22075370/timeline”,”question_comments_url”: “/questions/22075370/comments”,”question_answers_url”: “/questions/22075370/answers”,”question_id”: 22075370,”owner”: {“user_id”: 3343981,”user_type”: “registered”,”display_name”: “user3343981″,”reputation”: 3,”email_hash”: “55d0eb4577a0ba9f9e428d445431b595″},”creation_date”: 1393

  • Coby Kaufer
    php json api ftp
    I’m aware that many people have had this issue with json_decode, but for my situation it’s a little different. I had this website working, using the youtube API and the json_decode function . It was working, until I thinkI accidentally may have replaced the .htaccess file in my domains main directory, and now all other websites going off that FTP account are returning similar errors. Does anyone know of any solutions to this? Here is my php.ini file: register_globals = Offzend_extension=”/usr/lo

  • Brandon
    java json asynchronous file-download
    I am downloading from a server using AsyncTask class. Sometimes my code works fine, and sometimes it throws an exception.This is my logcat:06-29 17:29:01.123: E/AndroidRuntime(321): FATAL EXCEPTION: AsyncTask #5 06-29 17:29:01.123: E/AndroidRuntime(321): java.lang.RuntimeException: An error occured while executing doInBackground() 06-29 17:29:01.123: E/AndroidRuntime(321): at android.os.AsyncTask$3.done(AsyncTask.java:200) 06-29 17:29:01.123: E/AndroidRuntime(321): at java.util.concurrent.Futu

  • user2584493
    java php android mysql json
    I am having issues with my attempt to connect via JSON to a PHP file to access MySQL in android. I cannot for the life of me figure out why this is causing my app to crash. Any ideas?It is throwing the following error: AndroidRuntime FATAL EXCEPTION: mainI am attemping to call this from my main activity:new getData().getMovie();Which calls this:import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList;import org.apache.http.*; import

  • leppie
    php html json foreach json-decode
    I´ve got the following: include(‘php/get_recipe_byID.php’);$jsonstring1 = $recipe_byidarr;$recip = json_decode($recipe_byidarr, true);print_r($recip);foreach ($recip[‘Data’][‘Recipes’] as $key => $newrecipe) {// echo ‘<li>// <a href=”/recipe_search.php?id=’ . $recipe[‘ID’] . ‘”>’;echo ‘seas’;echo $newrecipe[‘TITLE’];echo ‘<br><br>’; } When I call it in the browser, it tells me thatFatal error: Cannot use string offset as an array in /var/www/recipe_sea

  • MirroredFate
    php json apache ubuntu
    Apache is logging PHP Fatal error: Call to undefined function json_decode(). After some googling, it seems this problem is a result of not having the latest version of php. Oddly, running php –version ouputs PHP 5.5.1-2+debphp.org~precise+2 (cli) (built: Aug 6 2013 10:49:43) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologieswith Zend OPcache v7.0.2-dev, Copyright (c) 1999-2013, by Zend Technologieswith Xdebug v2.2.3, Copyright (c) 2002-2013, b

  • guyja
    python json python-requests
    I’m using python-requests to work with an elasticsearch index. In particular I’m not getting what I want from requests.json() (wraps the json.loads() function in the standard lib). I’m struggling with the result returned by the json() method. It seems to be returning a list of strings. I want a dict object that I can loop through to access each members attributes i.e…r = requests.get(url) results = r.json() //same as results = json.loads(json string) print(results)for result in results:pri

  • erj2code
    java json spring properties apache-camel
    I have a HelloWorld Java project that uses Camel to obtain a Map, and print out its contents in JSON format. The Map currently has hardcoded values, but I really want to change my code so that it uses Spring to load a sensor.properties file of nested key,value pairs into this Map.I have another Java project I wrote that only uses Spring, and can load the sensor.properties file just fine into an Arraylist object.However, when I try to use code from that project to load the sensor.properties in m

  • cmnunis
    android json wcf sql-server-2008
    I am currently developing an Android app that gets details from an SQL Server table. Thanks to everyone who has helped previously with my understanding of AsyncTasks and JSON, I can now retrieve objects. However, my attempt at updating tables from an Android device is not so smooth. Firstly, I’ll begin with the table: I have a JobStatus table that is populated by a trigger that runs as a new record is entered into the Jobs table. When the trigger is run, these 4 columns are populated, namely:-Th

  • user1015214
    php jquery-ajax
    I am making an ajax call in jquery$.get(“validate_isbn.php”, {isbn: obj[16]},function(answer) { console.log(answer);if (answer == “valid”){var checked1 = $(elements[index]).val();//$(elements[index]).val().append(“<img src = ‘pics/green_checkmark.png’>”); //doesn’t work//elements.after(“<img src = ‘pics/green_checkmark.png’>”); //sets all the elements with this picelements.eq(index).after(“<img src=’pics/green_checkmark.png’ id=’checkmark’>”);var checke

  • Eagletrophy
    codeigniter jquery-ajax
    I wanted to ask, why does the response from a ajax request using the native ajax not post or get return my entire page? is there anything I should know? I have looked at the documentation on jquery.com and nothing is mentioned of something like that unless i’m looking else where. Can I get any help on why that keeps happening?This is the function that handles the validation of the form in question.joefunction showsupport() {$this->form_validation->set_rules(‘supportername’,’Your Name’,’tri

  • LazyTarget
    jquery jquery-ajax
    I’m trying to serialize my form data including file image field using jquery.form.js jQuery API. The API is helping me to serailze data fields including image and return image object as [object file] Here is my code for serializationvar data = $js(“form[name=ajx_imgupload]”).formSerialize();var img = $js(“#upload_image”).fieldSerialize();$js.ajax({url: “index.php?option=com_obituary&task=upload”,type: “POST”,dataType:”json”,data: data,beforeSend: function() {$js(“.loadingblock”).show(

  • robx
    jquery jquery-plugins jquery-ajax jquery-validate
    I am getting very frustrated with this jquery form validation ajaxSubmit();In chrome, it seems to fail silently without even hitting the submitHandler, firefox does, but still goes on to the action=”contact.php” page. I was expecting it to just post in the background and possibly return results, but can’t get it to work that way.Edit: Found a fix for this if anyone else is interested, put this line of code somewhere in your dom ready. // disable HTML5 native validation and let jquery handle it.$

  • Basit
    jquery ajax jquery-ajax loops response
    i have list of rows that user select and i want to delete them, one by one and show the result in the end.obviously if i just do simple loop and call each time ajax function, but how can i loop and check which one successed and which one failed and when they are all done?how would you do it? what is proper way of doing the bulk editing/deleting?

  • PseudoNym01
    jquery-ajax post asp.net-mvc-4
    My ajax call looks like this$.ajax({ //actually approve or reject the promotionurl: url,type: “POST”,data: ‘{‘+data.PromotionId+’,’+data.UserId+’,’+data.ReasonText+’}’,dataType: “json”,//contentType: “application/json; charset=utf-8”,success: function (data) {if (indicator == ‘A’) {alert(‘Promotion approved successfully!’);}else {alert(‘Promotion rejected successfully.’);}var homelink = ‘<%: Url.Action(“Index”,”Home”) %>’;window.location.href = (homelink);returndata = data;},error: functio

  • Vortex
    android wcf jquery-ajax phonegap jsonp
    Firstly I would like to thank all the experts here on stackoverflow, by reading questions asked and looking at example code and reading the answers i have been able to get to this point. Thank you once again!I have been spending hours and hours searching for a solution, I’ve read through many posts on this issue. It’s seem this is a issue a lot of others are/has been struggling with.I would highly appreciate any more advise or tips if somebody can assist in this frustrating issue.All my develop

  • Chris
    jquery jquery-ajax
    I’ve posted a question on here (jQuery ajax returning Object Object) and following the advice of one of the answers I’ve tried playing around with the jQuery Ajax ‘Error’ responses. Below is the code that I used followed by the response on the console, but I don’t understand what they mean. Can anyone shed any light on this (or on my original question?)Thanks!My Codeerror: function(jqXHR, textStatus, errorThrown) { console.log(JSON.stringify(jqXHR)); console.log(“AJAX error: ” + textStatus + ‘ :

  • actkatiemacias
    json jquery-ajax
    I am having trouble getting the contents of JSON object from a JQery.ajax call. My call:$(‘#Search’).click(function () {var query = $(‘#query’).valueOf();$.ajax({url: ‘/Products/Search’,type: “POST”,data: query,dataType: ‘application/json; charset=utf-8’,success: function (data) {alert(data);for (var x = 0; x < data.length; x++) {content = data[x].Id;content += “<br>”;content += data[x].Name;content += “<br>”;$(content).appendTo(“#ProductList”);// updateListing(data[x]);}}}); });I

  • nlgndg
    ajax jquery-ajax
    I am making an ajax requests with following details:Request URL:http://localhost:8080/MyWebService/cars/70ced046-3061-4d9d-b9ce-7d1291d5b5c0 Request Method:DELETE Status Code:200 OKRequest Headers Accept:*/* Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:no-cache Content-Type:application/json Host:localhost:8080 Origin:http://localhost:8080 Pragma:no-cache Proxy-Connection:keep-alive Referer:http://localhost:8080/MyWeb

  • Amanada Smith
    php mysql cakephp web-applications
    PHP Fatal error: Class ‘PDO’ not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177PHP INFO:PDOPDO support => enabled PDO drivers => sqlite, sqlite2, mysqlpdo_mysqlPDO Driver for MySQL => enabled Client API version => 5.5.24Directive => Local Value => Master Value pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sockpdo_sqlitePDO Driver for SQLite 3.x => enabled SQLite Library => 3.7.7.1PHP IN

  • a_horse_with_no_name
    sql eclipse web-applications psql
    I just start to install and run eclipse to access to psql server. And running windows 7 32 bits I just set up the basic form for web app form in the eclipse.in the content.xml file i have..<Context path=”” debug=”5″ override=”true” reloadable=”true”> <Resource name=”jdbc/connection_pool”description=”DB Connection Pool”driverClassName=”org.postgresql.Driver”type=”javax.sql.DataSource”auth=”Container”url=”jdbc:postgresql://localhost/students-database” username=”postgres”password=”1234″d

  • Ripon Al Wasim

  • Ondra Žižka
    web-applications jboss jboss7.x
    I am trying to migrate my business application which is running on JBoss 5.1 GA to JBoss 7. I am confronted with different errors and I can’t find a way to fix this. So let’s start with my configuration:standalone.xml:<datasource jndi-name=”java:/SSIS2DSDev” pool-name=”SSIS2DSDev” enabled=”true” use-java-context=”true”><connection-url>jdbc:oracle:thin:@xx.xx.xx.xx:xxxx:SSISD1</connection-url><driver-class>oracle.jdbc.OracleDriver</driver-class><driver>ojdbc5.j

  • user3312672
    php android json web-applications
    I am making a andriod app which performs CRUD operations on a localhost php database here is my code and the log cat. please help to fix the errorsJSONParser.javapackage com.example.androidhive;import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.List;import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import o

  • user1646481
    java web-applications spring-mvc war activiti
    I have never come across this problem before. Actaully, I have a web application running through a war file. I have configured Spring to work with it and it works perfectly. The problem is that I am trying to configure Activiti through Spring. Basically, there is a set of .bpmn20.xml files inside the WEB-INF/processes folder. The Activiti team has mentioned that they do not know how to configure this inside a web application. As a standlone application I can deploy resources .bpmn20.xml files au

  • tangent
    java spring tomcat web-applications
    My Java web app running Tomcat (7.0.28) periodically becomes unresponsive. I’m hoping for some suggestions of possible culprits (synchronization?), as well as maybe some recommended tools for gathering more information about what’s occurring during a crash. Some facts that I have accumulated:When the web app freezes up, tomcat continues to feed request threads into the app, but the app does not release them. The thread pool fills up to the maximum (currently 250), and then subsequent requests

  • Jakob Abfalter
    hibernate web-applications jpa entitymanager
    I am having an issue with JPA which I am unable to solve.Im deploying my webapp on the glassfish 3+ and when the EntityManagerFactory should be build, it always throws an exeption:javax.persistence.PersistenceException: [PersistenceUnit: lab4] Unable to build EntityManagerFactoryHeres the Stack Trace:javax.faces.el.EvaluationException: javax.persistence.PersistenceException: [PersistenceUnit: lab4] Unable to build EntityManagerFactoryat javax.faces.component.MethodBindingMethodExpressionAdapter.

  • AnAmuser
    web-applications jsf glassfish
    I am running a webapp on a glassfish v3 server. I’ve just added richfaces to my application, but I get an error when i try running my project:INFO: Initializing Mojarra 2.0.2 (FCS b10) for context ‘/WMC’ INFO: Unsanitized stacktrace from failed start… java.lang.RuntimeException: WEB9033: Unable to load class with name [org.ajax4jsf.taglib.html.facelets.ActionParamHandler], reason: java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandlerat org.glassfish.web.loader.WebappClassLo

  • Ram
    javascript html tomcat web-applications jetty
    I have a very simple webapp where I am trying to plot graphs using flot javascript library. My JSP file goes this way where I am importing the required *.js files as follows. Relative to the hello.jsp file at WEB-INF/pages/hello.jsp, scripts directory with the relevant .js files are at ../../scripts (i.e. directly under ROOT)<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> <html> <head><meta http-equiv=”Content-Type” content=”text/ht

  • user1299846
    java android html phonegap
    I just started with phonegap, so I went throught this tutorial [http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html][1] [1]: http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.htmlCatlog:08-09 14:36:21.752: E/AndroidRuntime(543): FATAL EXCEPTION: main 08-09 14:36:21.752: E/AndroidRuntime(543): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.apache.cordova.example/org.apache.cordova.example.cordovaExample}: java.lang.Cla

  • Peacemoon
    android phonegap android-asynctask freeze progressdialog
    I have a strangle behavior when implementing AsynTask and ProgressDialog. When i download small file, everything works fine, the progress status is updated from 0% to 100%. But when i download larger files, the number on ProgressDialog runs to 6 or 7% then it is not updated anymore. But after 2,3 minutes, i receive a messge that asyntask task finished the downloading process.public class DownloadHelper extends AsyncTask<String, Integer, Long> implements DialogInterface.OnDismissListener{pr

  • user1291129
    phonegap jquery-mobile cordova
    i have created an app which is used for uploading images to server using HTML5, jQuery Mobile and phonegap 2.2. I had try different approaches as follow:1)input type=file, this is working absolutely fine in Simulator it take upload the picture but it doesnot work on real device don’t know why.2)Second approach i used is of phonegap camera plugin.I simply use the already created code from the device it works fine if i create a separate project but when i integrate in my project it just stop respo

  • Ben
    android node.js phonegap socket.io
    Problem SummaryI am trying to bundle a simple socket.io chat app into a native app to run on Android 2.2 and above using phonegap.socket.io web client –> socket.io server worksI have a simple server running socket.io which successfully communicates with a socket.io client when its run in a web browser.socket.io mobile client in mobile browser –> socket.io server worksNote that because websockets arent supported on Android 2.2 it defaults back to xhr polling, sample messages from server when co

  • Andrew
    android gwt phonegap
    I have what I think is a fairly standard set-up of an existing web-app and would like advice on how best to adapt it for creating native versions via PhoneGap, in a way that we can keep developing the web-app and updating the phonegap generated versions from it with minimal rework.I am a PhoneGap novice. I have searched around and tried various suggestions from StackOverflow etc with no luck, at least for my set-up.The app is developed in GWT and consists of:static resources in a shared folder f

  • stealthjong
    javascript android phonegap
    I have and application built with PhoneGap, and I’m trying to communicate with Javascript from native code.in my DroidGap extending class:@Override public void onCreate(Bundle savedInstanceState) {Logger.log(“oncreate”);super.onCreate(savedInstanceState);super.init();super.appView.getSettings().setJavaScriptEnabled(true);super.appView.getSettings().setSupportZoom(true);super.appView.getSettings().setBuiltInZoomControls(true);super.appView.getSettings().setDisplayZoomControls(false);jsinterface =

  • user1386579
    phonegap cordova phonegap-plugins cordova-2.0.0
    I am new to phonegap plugin; I thought of writing a small echo plugin; but I get this error Falling back on PROMPT mode since _cordovaNative is missing. at file:///android_asset/www/js/cordova-2.3.0.js:1112 and also the echo event is not fired, I attach my files for your referenceThis is my index.html ` <!DOCTYPE html><html lang=”en”> <head><meta charset=”utf-8″><title>Login | Royce Apps</title><meta name=”viewport” content=”width=device-width, initial-scal

  • clint
    javascript objective-c ios phonegap cordova
    I am using phonegap/cordova(2.1.0) to create IOS app. i want to call a javascript function in index.html file of the phonegap from an objective-c function. So, i am creating an instance ‘theWebView’ of the ‘UIWebView’ class like below:Code in AppDelegate.h:#import <UIKit/UIKit.h>#import <Cordova/CDVViewController.h> #import “sqlite3.h”@interface AppDelegate : NSObject < UIApplicationDelegate > {NSString* invokeString;}@property (nonatomic, strong) IBOutlet UIWebView* theWebView

  • user2122206
    php javascript jquery html5 phonegap
    So I have it set up to upload images via Phonegap native apis from devices images/camera with random numbers attached to the image name. I’m trying to figure out how to access the final url of the image location on the server so that I can utilize that url of the image when making a Facebook post since they require external uploaded images.Code: .php<?php $dir = “upload”; $randomImg = rand(1, 9999).”image”.rand(1, 999999).”.jpg”; if ($_FILES) {print_r($_FILES);mkdir ($dir, 0777, true); move_

  • Anas Jaghoub
    android webview slider phonegap swipe
    Hope you are fine, Actually this is my first post here, I searched a lot, and tried a lot to find a suitable solution for my problem, but unfortunately could not find the answer for my problem.The problem is: I am developing an android application using html, css and javascript. my application depends on Phonegap framework. The application consists of a quite number of local pages. In the application I am trying to handle swipe gesture event on the android mobile and move the pages depending on

Web site is in building