These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

ajax and the IGB

Author
Ialocin
GRiiMM Industries
Outer Elysium
#1 - 2013-07-04 16:53:31 UTC
Does the IGB support ajax calls?
I've been trying to get it to grab some json data, from a webservice, and I haven't really had any success yet.
The entire project runs fine, in any other browser I've tested with.

Does anyone have experience with this?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2013-07-04 19:41:17 UTC  |  Edited by: Steve Ronuken
depends how complex you want to go in the ajax, really.

https://www.fuzzwork.co.uk/2012/04/13/prowler-fitting/ depends on ajax to work, for example.

You /might/ get something useful out of the log server.
http://wiki.eveonline.com/en/wiki/Log_Server

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Ialocin
GRiiMM Industries
Outer Elysium
#3 - 2013-07-04 20:36:15 UTC
Steve Ronuken wrote:
depends how complex you want to go in the ajax, really.

https://www.fuzzwork.co.uk/2012/04/13/prowler-fitting/ depends on ajax to work, for example.

You /might/ get something useful out of the log server.
http://wiki.eveonline.com/en/wiki/Log_Server

Thank you. Never looked at log server before.

Well, I am getting a few javascript errors. Even says jquery is undefined, what the hell..
I guess I'll need to look deeper into this. Is the IGB particular picky about how to load js files maybe?
Liu Ellens
Sebiestor Tribe
Minmatar Republic
#4 - 2013-07-04 20:37:37 UTC
Only in the sense that it's a quite old version of WebKit. It doesn't even support Object.create() .

Well, they oughta know what to do with them hogs out there for shure.

Nnaem Kvorr
Fleet-Up.com
Keep It Simple Software Group
#5 - 2013-07-05 11:33:47 UTC  |  Edited by: Nnaem Kvorr
Ialocin wrote:
Does the IGB support ajax calls?
I've been trying to get it to grab some json data, from a webservice, and I haven't really had any success yet.
The entire project runs fine, in any other browser I've tested with.

Does anyone have experience with this?


I do and yes it does. If you are not already, I would suggest using a JS library like jQuery that has dedicated cross-browser-tested ajax methods to help avoid getting stuck in the trap of managing your own AJAX requests and having to manually test on many browsers.

Its probably also worth noting that if the web service you are using does not reside on the same host as the site running and serving your javascript file then you may run into cross-site-scripting restrictions.

Fleet-Up.com - Your fleet operations, on steroids.

Ialocin
GRiiMM Industries
Outer Elysium
#6 - 2013-07-05 12:45:01 UTC
Nnaem Kvorr wrote:
Ialocin wrote:
Does the IGB support ajax calls?
I've been trying to get it to grab some json data, from a webservice, and I haven't really had any success yet.
The entire project runs fine, in any other browser I've tested with.

Does anyone have experience with this?


I do and yes it does. If you are not already, I would suggest using a JS library like jQuery that has dedicated cross-browser-tested ajax methods to help avoid getting stuck in the trap of managing your own AJAX requests and having to manually test on many browsers.

Its probably also worth noting that if the web service you are using does not reside on the same host as the site running and serving your javascript file then you may run into cross-site-scripting restrictions.

Yea I'm already using jquery and it's on the same site.
I'll need to play around with this.
What jquery version are you using? Is it possible, that the jquery v2 doesn't work? Maybe due to old browser support being removed?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#7 - 2013-07-05 12:48:15 UTC
I'm using 1.8.3

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Ialocin
GRiiMM Industries
Outer Elysium
#8 - 2013-07-05 12:52:58 UTC
I'll try to take a 1.9 version, and see if that changes anything.
Nnaem Kvorr
Fleet-Up.com
Keep It Simple Software Group
#9 - 2013-07-05 14:18:01 UTC
Ialocin wrote:

What jquery version are you using? Is it possible, that the jquery v2 doesn't work? Maybe due to old browser support being removed?


It is possible that JQ version 2 might not work well for the reason you state. I'd certainly test any site functions as you develop them directly in the IGB if you are targetting in-game usage heavily.

I'm still running something like 1.7 or 1.8 on Fleet-Up IIRC. If I get a chance to test JQ v2 in the IGB I'll drop you a mail with my findings.

Fleet-Up.com - Your fleet operations, on steroids.

Ialocin
GRiiMM Industries
Outer Elysium
#10 - 2013-07-05 14:25:23 UTC
Well, that was easy.
It was the v 2 jquery.
I replaced it with 1.10.2 and everything works.
Kid Delicious
Caldari Provisions
Caldari State
#11 - 2013-07-06 03:47:57 UTC
Thought I'd throw this in there. I ran across it the other day while trying to interrogate the CCPEVE object, might be helpful in the future, since debugging in IGB is a nightmare. You can inject it into your page, details are on the site.

"...It doesn't even support Object.create()" no Function.bind either :(