jQuery Plugins » parse https://jqueryplugins.info jQuery plugins, tutorials and resources Tue, 18 Oct 2011 06:14:17 +0000 en hourly 1 http://wordpress.org/?v=3.2.1 Parse json from Yahoo pipes using jquery/ javascript https://jqueryplugins.info/2011/10/parse-json-from-yahoo-pipes-using-jquery-javascript/ https://jqueryplugins.info/2011/10/parse-json-from-yahoo-pipes-using-jquery-javascript/#comments Sat, 15 Oct 2011 13:13:50 +0000 Admin https://jqueryplugins.info/2011/10/parse-json-from-yahoo-pipes-using-jquery-javascript/ Post link: Parse json from Yahoo pipes using jquery/ javascript

This is the format of the json that I get from Yahoo pipes. {"count":3, "value":{ "title":"Freak count feed", "description":"Pipes Output", "link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=565sdf6as5d4fasdac94835f", "pubDate":"Sat, 15 Jan 2011 05:53:12 -0320", "generator":"http:\/\/pipes.yahoo.com\/pipes\/","callback":"", "items":[ {"title":"photos...

]]>
Post link: Parse json from Yahoo pipes using jquery/ javascript

This is the format of the json that I get from Yahoo pipes.

 {"count":3,
        "value":{
            "title":"Freak count feed",
            "description":"Pipes Output",
            "link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=565sdf6as5d4fasdac94835f",
            "pubDate":"Sat, 15 Jan 2011 05:53:12 -0320",
            "generator":"http:\/\/pipes.yahoo.com\/pipes\/","callback":"",
            "items":[
                {"title":"photos count",
                "y:title":"photos count",
                "description":"6"},
                {"title":"videos count",
                "y:title":"videos count",
                "description":"null"},
                {"title":"blogs count",
                "y:title":"blogs count",
                "description":"7"}
                ]
                            }
        }

I have the Yahoo pipes url. How do i parse the json from the url using jquery to get the count from the ‘description’ for each content type?

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/parse-json-from-yahoo-pipes-using-jquery-javascript/feed/ 0
How to parse json response and add functions like error,complete to it using JQuery? https://jqueryplugins.info/2011/10/how-to-parse-json-response-and-add-functions-like-errorcomplete-to-it-using-jquery/ https://jqueryplugins.info/2011/10/how-to-parse-json-response-and-add-functions-like-errorcomplete-to-it-using-jquery/#comments Wed, 12 Oct 2011 11:14:09 +0000 Admin https://jqueryplugins.info/2011/10/how-to-parse-json-response-and-add-functions-like-errorcomplete-to-it-using-jquery/ Post link: How to parse json response and add functions like error,complete to it using JQuery?

I am working on making a mini app using Json parsing . Output I am getting by hitting url http://localhost:3000/cities.json is as below [ { "id": 1, "name": "Bangalore" },...

]]>
Post link: How to parse json response and add functions like error,complete to it using JQuery?

I am working on making a mini app using Json parsing . Output I am getting by hitting url http://localhost:3000/cities.json is as below

[
    {
    "id": 1,
    "name": "Bangalore"
    },
    {
    "id": 2,
    "name": "Chandigarh"
    },
    {
    "id": 3,
    "name": "Chennai"
    },
    {
    "id": 4,
    "name": "Hyderabad"
    },
]

I have parsed this using function

  $  .getJSON("http://localhost:3000/cities.json?&callback=?", function(data) {
                //something something
 }

Now I want to add .error function to it so in case there is some issue with response or say server doesnt respond i may get to know about it say by putting an alert like

.error(function(){alert("error");})

I tried it in following way

  $  .getJSON("http://localhost:3000/cities.json?&callback=?", function(data) {
                //something something
         }).error(function(){
            alert("error");
         })

I tried it using this way as well

     var cities = $  .getJSON("http://localhost:3000/cities.json");
                   cities.error("hi");

But none of them is working. To check for error i stop my local server and it doesnt give me any alert for that . Please guide me which way should i proceed ?

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/how-to-parse-json-response-and-add-functions-like-errorcomplete-to-it-using-jquery/feed/ 0
How to parse atom feed using jquery https://jqueryplugins.info/2011/09/how-to-parse-atom-feed-using-jquery/ https://jqueryplugins.info/2011/09/how-to-parse-atom-feed-using-jquery/#comments Mon, 26 Sep 2011 12:19:43 +0000 Admin https://jqueryplugins.info/2011/09/how-to-parse-atom-feed-using-jquery/ Post link: How to parse atom feed using jquery

I want to know how to parse atom feed using jquery. i had feed url like below http://www.google.co.in/trends/hottrends/atom/hourly Below is jsfiddle but it’s not working http://jsfiddle.net/sukumar/sWPkT/ newest questions tagged jquery...

]]>
Post link: How to parse atom feed using jquery

I want to know how to parse atom feed using jquery.

i had feed url like below

http://www.google.co.in/trends/hottrends/atom/hourly

Below is jsfiddle but it’s not working

http://jsfiddle.net/sukumar/sWPkT/

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/09/how-to-parse-atom-feed-using-jquery/feed/ 0
Unable to parse atom feed using jQuery https://jqueryplugins.info/2011/09/unable-to-parse-atom-feed-using-jquery/ https://jqueryplugins.info/2011/09/unable-to-parse-atom-feed-using-jquery/#comments Sat, 24 Sep 2011 11:14:25 +0000 Admin https://jqueryplugins.info/2011/09/unable-to-parse-atom-feed-using-jquery/ Post link: Unable to parse atom feed using jQuery

I’m using jFeed to parse atom feed and trying to display the title. I had written success and error functions but it’s not getting into either success or error function....

]]>
Post link: Unable to parse atom feed using jQuery

I’m using jFeed to parse atom feed and trying to display the title. I had written success and error functions but it’s not getting into either success or error function.

Below is my code. Please let me know what’s going wrong with below code.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery.jfeed.js"></script>

<script type="text/javascript">

$  (document).ready(function(){

//read the atom feed

$  .getFeed({
    type:"GET",
    url:"http://www.google.co.in/trends/hottrends/atom/hourly",
    success:function(feed)
    {
        alert(feed.title);
    },
    error:function(error)
    {
        alert(error);
    }

});

});

</script>
</head>
<body>
<div id="content"></div>
</body>
</html>

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/09/unable-to-parse-atom-feed-using-jquery/feed/ 0
Q&A: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’? https://jqueryplugins.info/2011/08/qa-parse-error-syntax-error-unexpected-t_string-expecting-or/ https://jqueryplugins.info/2011/08/qa-parse-error-syntax-error-unexpected-t_string-expecting-or/#comments Thu, 25 Aug 2011 13:50:58 +0000 Admin https://jqueryplugins.info/2011/08/qa-parse-error-syntax-error-unexpected-t_string-expecting-or/ Post link: Q&A: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’?

Question by Chia: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’? what’s wrong with this code, I’ve got this error: Parse error: syntax error, unexpected T_STRING, expecting ‘,’...

]]>
Post link: Q&A: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’?

Question by Chia: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’?
what’s wrong with this code, I’ve got this error:

Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/geobitge/domains/geobit.ge/public_html/test/administration/panel_editor.php(111) : eval()’d code on line 3

I want to add mentioned below script to PHP-FUSION side panel, it’s an image rotator script.

openside(“Random”);
echo ‘



Jquery Auto Image Rotator

  • pic1
  • pic2
  • pic3
  • pic4

‘;
closeside();
I made changes mentioned, I mean ( ), it took away error but displays now nothing.
and if it’s a faulty script Can anyone give me some script to rotate random images from one folder and it must be put in the side panel of PHP-Fusion 6.

Best answer:

Answer by Yanni Depp
You can’t use ‘ to start a string, then use it inside the string without a \

What do you think? Answer below!

]]>
https://jqueryplugins.info/2011/08/qa-parse-error-syntax-error-unexpected-t_string-expecting-or/feed/ 2
Parse ANY RSS feed to be used in any way you want, php or ajax part 2 https://jqueryplugins.info/2011/08/parse-any-rss-feed-to-be-used-in-any-way-you-want-php-or-ajax-part-2/ https://jqueryplugins.info/2011/08/parse-any-rss-feed-to-be-used-in-any-way-you-want-php-or-ajax-part-2/#comments Wed, 24 Aug 2011 12:05:36 +0000 Admin https://jqueryplugins.info/2011/08/parse-any-rss-feed-to-be-used-in-any-way-you-want-php-or-ajax-part-2/ Post link: Parse ANY RSS feed to be used in any way you want, php or ajax part 2

Use this simple php file to grab ANY RSS feed and use it, either by way of PHP or by way of ajax and jquery. Grab the files here at...

]]>
Post link: Parse ANY RSS feed to be used in any way you want, php or ajax part 2

Use this simple php file to grab ANY RSS feed and use it, either by way of PHP or by way of ajax and jquery. Grab the files here at optikalefx.com and xml2.txt

]]>
https://jqueryplugins.info/2011/08/parse-any-rss-feed-to-be-used-in-any-way-you-want-php-or-ajax-part-2/feed/ 0
How do I parse variables from ajax to a controller and return a bool https://jqueryplugins.info/2011/08/how-do-i-parse-variables-from-ajax-to-a-controller-and-return-a-bool/ https://jqueryplugins.info/2011/08/how-do-i-parse-variables-from-ajax-to-a-controller-and-return-a-bool/#comments Thu, 18 Aug 2011 06:15:59 +0000 Admin https://jqueryplugins.info/2011/08/how-do-i-parse-variables-from-ajax-to-a-controller-and-return-a-bool/ Post link: How do I parse variables from ajax to a controller and return a bool

I want to parse 2 strings (Just testing with one atm( consiting of a date from a datepicker and hour and minute from 2 textfields. But I cant figure out...

]]>
Post link: How do I parse variables from ajax to a controller and return a bool

I want to parse 2 strings (Just testing with one atm( consiting of a date from a datepicker and hour and minute from 2 textfields. But I cant figure out how to parse data from my ajax call to the method I call, I know its called as I checked with a breakpoint, but its parameter is just null.

My ajax:

$  ('.datein').change(function () {
    alert("datein changed");
    //send servervalidering ajax
    var result = false;
    $  .ajax({ url: "Resource/isDateValid/",
            data: ($  ('#resource_datein').val() + "-" + $  ('#resource_hourin').val() + "-" + $  ('#resource_minutein').val()),
        type: "POST",
        sucess: ajaxsuccess(result)
    }
    );
});

My methodcall on success

function ajaxsuccess(result) {
    alert("ajax lykkes!" + result);
}

And the controller method which is part of public class ResourceController : DataTablesController

    [HttpPost]
    public bool isDateValid(string dateIn)
    {

        return true;
    }

string dateIn just returns null if I set a date

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/08/how-do-i-parse-variables-from-ajax-to-a-controller-and-return-a-bool/feed/ 0
Why can’t I parse this JSON url with javascript and jQuery? https://jqueryplugins.info/2011/08/why-cant-i-parse-this-json-url-with-javascript-and-jquery/ https://jqueryplugins.info/2011/08/why-cant-i-parse-this-json-url-with-javascript-and-jquery/#comments Wed, 17 Aug 2011 12:46:40 +0000 Admin https://jqueryplugins.info/2011/08/why-cant-i-parse-this-json-url-with-javascript-and-jquery/ Post link: Why can’t I parse this JSON url with javascript and jQuery?

Question by Matt W.: Why can’t I parse this JSON url with javascript and jQuery? I’m trying to parse this JSON url and every tutorial I find for javascript and...

]]>
Post link: Why can’t I parse this JSON url with javascript and jQuery?

Question by Matt W.: Why can’t I parse this JSON url with javascript and jQuery?
I’m trying to parse this JSON url and every tutorial I find for javascript and jQuery works fine with its own url but when I prepare and use the script with this one, it fails.
The url is: https://mtgox.com/code/data/ticker.php
It is a remote site so I cannot do any changes to it, and I’ve written a script in php that works, but I need it in javascript.
Thanks in advance for any help!
Yeah, I’ve just went with php and it works, but saddly my server won’t allow me to parse from Mt. Gox, yet it works with TradeHill.
With Mt. Gox is runs an indefinite load and it never completes pulling the information, but it works flawlessly on TradeHill.
On a friend’s server, both works. Is there a way to get this thing to work with Mt. Gox, assuming that it’s an .htaccess or phpini problem…

Best answer:

Answer by Gitlez
Because of the security features in Javascript. It will not allow you to load data from another server.

Solution: use a php file to gather the information for you. Running the simple php script on your server will allow Javascript to load it.

PHP Script:
echo file_get_contents('http://mtgox.com/code/data/ticker.php');
?>

**Note** If you are testing this on your personal computer, you will need a personal server to parse the php script for you. There are lots of free ones available. Let me know, through the email link on my profile page, if you need help with this. There are also lots of portable ones (they do not install files all over your system).

Cheers,
Gitlez

What do you think? Answer below!

]]>
https://jqueryplugins.info/2011/08/why-cant-i-parse-this-json-url-with-javascript-and-jquery/feed/ 0