Jump to content


Photo

Extension: GM AJAX


  • Please log in to reply
8 replies to this topic

#1 JacksonYarr

JacksonYarr

    GMC Member

  • GMC Member
  • 248 posts
  • Version:GM:Studio

Posted 18 January 2012 - 04:46 PM

Greetings,

I've put together a small extension (GM AJAX) that allows for easy AJAX (Asynchronous JavaScript and XML) communication. The extension allows for multiple concurrent AJAX requests using either the GET or POST method.

View Example | Download GM AJAX | View Help File

The download includes the extension, a heavily commented example, the help file and a copy of the PHP script used to reply to the example's requests.

Hopefully some of you will find this of use.

- JacksonYarr
  • 1

#2 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 876 posts
  • Version:GM:Studio

Posted 18 January 2012 - 05:48 PM

Hey - 1 thing:

Check my sig: http://forums.gmhtml...sg11.html#msg11

Isn't that the same function basically? Its on the forums here as well.

Edited by blackhawkrobbo, 18 January 2012 - 05:49 PM.

  • 0

#3 JacksonYarr

JacksonYarr

    GMC Member

  • GMC Member
  • 248 posts
  • Version:GM:Studio

Posted 18 January 2012 - 11:30 PM

It's certainly similar, however the most pressing difference I can see is that your requests aren't asynchronous; So the application will freeze until it receives a reply.

This also means that concurrent AJAX requests can't be made - as the application will hang until a reply to the first has arrived before making a second request.

This might not be as noticeable while testing on localhost, but it's certainly noticeable when sending requests over the internet.

Edit:
I've updated the example with a moving ball to demonstrate that the requests made are asynchronous (The program doesn't freeze while it is waiting for a reply).

Edited by JacksonYarr, 19 January 2012 - 12:26 AM.

  • 0

#4 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 876 posts
  • Version:GM:Studio

Posted 19 January 2012 - 11:26 AM

Oh yeah ofcourse. It was my intention to make it wait anyway :) For e.g. receiving map files or loggin in.

Would you like to add this GEX to gmhtml5.net? http://forums.gmhtml...board,16.0.html

If you don't want to, then can i add it?

Cheers
  • 0

#5 JacksonYarr

JacksonYarr

    GMC Member

  • GMC Member
  • 248 posts
  • Version:GM:Studio

Posted 19 January 2012 - 02:46 PM

You're more than welcome to link to or host a copy on your website.

Perfectly happy with people using, modifying or distributing it.
  • 0

#6 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 876 posts
  • Version:GM:Studio

Posted 19 January 2012 - 08:14 PM

Okay, ive added it here:
http://forums.gmhtml...topic,18.0.html

This also is a mirror download (Check the attachment)

Thanks a lot JacksonYarr!
  • 0

#7 iceshield

iceshield

    GMC Member

  • GMC Member
  • 491 posts

Posted 21 January 2012 - 12:37 PM

how can i open the example ? it's .gmz ...
so far i find gamemaker:html5 hard to use

edit:
i find how ...
http://forums.gmhtml...topic,18.0.html

edit2:
still , i have an error when compliling
"Unable to find file extensions\GM AJAX\GM_AJAX.js"
it seams that i dont heave the GM_AJAX.js file :(

edit3:
i've get it from your web page with firebug and i make a new folder called 'GM AJAX' in extensions folder
here it is :
Spoiler

Edited by iceshield, 21 January 2012 - 01:20 PM.

  • 0

#8 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 876 posts
  • Version:GM:Studio

Posted 21 January 2012 - 01:26 PM

You will have to install the GEX via the extentions menu
  • 0

#9 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 876 posts
  • Version:GM:Studio

Posted 21 January 2012 - 01:33 PM

http://forums.gmhtml...topic,19.0.html <- here its how you can install extentions
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users