May 17, 2012

Ajax remoting for Invisible Castle

happy Ajax remoting for Invisible CastleI offer the code for my Invisible Castle site under a GPL license. However, it is not the easiest code in the world to get running. Plus, it is really overkill for most people. Most people who ask for the code really just want a die-roller with database lookup for their site. They aren’t really prepared to provide a working Python/Cheetah/MySql install. That’s fine, I could help them out and pick up a new skill in one fell swoop.

Ajax to the rescue

I quickly wrote a simple remote interface to the die-roller, and then used the Prototype library to implement an Ajax interface to it. Simple simple simple. It worked beautifully, with one problem, that pesky restriction agains cross-domain XMLHTTPRequests. So, I wrote a simple little PHP proxy page, and it works perfectly!

All together, this was a pretty nice payoff for a couple hours of work, including ramping up from zero about XMLHTTPRequest objects. I already have two remote client sites functioning happily using the script, which has a working demo with install instructions here.
[tags]javascript,Ajax,cross-site scripting,xss,xmlhttprequest,prototype[/tags]

Share and Enjoy:
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle
  • services sprite Ajax remoting for Invisible Castle

Related posts:

  1. AJAX goodness for Invisible Castle I just rolled my first real AJAX application out to...
  2. Prototype modification to fvlogger fvlogger.js is a fine logging system for Javascript, but when...

About Bruce Kroeze

Comments

  1. creamsteak says:

    It looks like your zip file link isn’t available through the link.

  2. spankweasel says:

    http://test.zefamily.com/remote.html is a 404.

    Can you update this link or possibly email me the zip file? Please?

Speak Your Mind

*