Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   Off-Topic Chat (https://www.graalians.com/forums/forumdisplay.php?f=14)
-   -   Shawn(or someone else) I need your help. (https://www.graalians.com/forums/showthread.php?t=8303)

iHawk 07-07-2012 03:59 AM

Shawn(or someone else) I need your help.
 
How do I get a number from an external URL JSON page and set it to a variable? On the page, there is {"_visitor_alertsUnread":"0"} along with a whole bunch of other stuff and I need to get that number. Note: needs to be JavaScript or jQuery, CAN NOT BE PHP! Thanks:D I'll rep you>:D

Ace 07-07-2012 04:02 AM

have you used google?

iHawk 07-07-2012 04:15 AM

Quote:

Posted by Ace
have you used google?

I have. And I've hit many dead ends. :(

The Doctor 07-07-2012 05:20 AM

So you want to edit a variable? That's easy.

iHawk 07-07-2012 05:38 AM

Quote:

Posted by Shawn
So you want to edit a variable? That's easy.

Noo. I want to retrieve a value from an external json page on a forum. and set that # to a variable.

The Doctor 07-07-2012 05:48 AM

So what exactly do you want to do with the variable so I can get a better understanding with the problem.

iHawk 07-07-2012 05:49 AM

Quote:

Posted by Shawn
So what exactly do you want to do with the variable so I can get a better understanding with the problem.

If thevariable>0 show a badge on an alert in a chrome extension. I know how to do that part though, it's just the getting the variable thats the problem. And I haven't even thought about refreshing...

The Doctor 07-07-2012 05:52 AM

Oh! I get it. So you want to be notified on a forum via a chrome extension and to do that you need to receive a variable?

iHawk 07-07-2012 01:37 PM

Quote:

Posted by Shawn
Oh! I get it. So you want to be notified on a forum via a chrome extension and to do that you need to receive a variable?

Notified by the chrome extension when you get a new message at the forum. There is a page that is in valid json on it that shows how many messages you have, and I need to get that number:D yes.

Era News 07-07-2012 02:13 PM

I have a head ache just from reading those comments, lol.

iHawk 07-07-2012 03:28 PM

Quote:

Posted by Era News
I have a head ache just from reading those comments, lol.

XD Oh by the way Shawn, I have to use XHR:3 and I'm very confuzzled.

The Doctor 07-07-2012 04:43 PM

I don't know XHR or JSON. I'm more of a PHP man :(

Ace 07-07-2012 04:45 PM

isn't this the php...
PHP Code:

{{#get_web_data:
url=<data source url>
|
format={CSV|CSV with header|GFF|JSON|XML}
|use 
xpath
|data=<local_variable_name1>=<external_variable_name1>[,...]
|
filters=<external_variable_name1>=<filter_value1>[,...]
}} 


Emera 07-07-2012 05:15 PM

So you want to grab data from another web page and store it in a var, to put it simply?

iHawk 07-07-2012 10:35 PM

Quote:

Posted by Emera
So you want to grab data from another web page and store it in a var, to put it simply?

Yes:>


All times are GMT. The time now is 02:48 PM.

Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.