jakeis.com = doing things @ Jake Jilg's personal home page = jakeis.com
(aesthetic only)

jakeis.com = Jake Jilg, doing things....

Jake Jilg
JSONp to Get Image Info

Server can get more image info than javascript and prior to image loaded.

That is a call to make a JSON, why not? Keep in mind that if you use my domain, it becomes external JSONp (asycronous / defeats the purpose) instead of a clean syncronous JSON , so it's better to look at my source and self host this, or else use vanilla javascript, if you want it.

This is a JSONp, and JSONp is x-domain ajax; it goes in the src of a <script> element, and it functions as an asycronous callback, because it's a dynamic script taking a query.

My query excludes the ? but it's a query. It does that in case the url in query has its own ? query.

My query takes 4 options.

  1. Image URL (required)
  2. callback function name
  3. 2nd arguments (string or integer) to better organize callback
  4. arguments AS_ARG || arguments as array AS_ZERO (constants for quirkiness?)

Play around with it as an iframe src that would be a sript src.

url = https://jakeis.com
img = https://jakeis.com/new-php-logo.png
(any domain / any image) ^

callback function and no arguments

callback with one arg as arg

callback with 4 args as arg

callback with 4 args as property 0 instead of separate args

tweak this ^ guy &&
see what this v guy does

PHP View-Source Link for Curiosity

I wish all the APIs had argument options for the callback. I did some Tumblr JSONp in Greasemonkey using the public key. Handling multiple async callbacks is weird without an intuitive way to know which one it was.

I think JavaScript can get this stuff with img/gl/canvas things which may be better than PHP because server resources, but I'm new to deep HTML5, yet.

Proudly NOT powered by any monopoly blogging platform, but many great thanks to Chromium/Mozilla DevTools, MAMP/Apache, and Notepad++/TextWrangler because they did all the real work here. I, Jake Jilg am just a designer.
Blogs & Blogs
    • Blog under construction.
    • Blog coming soon.
    • Blog under construction.