Let's say I have an image that needs to be shifted vertically, and I achieve it using the following code snippet:
document.getElementById('ImgID1').style.verticalAlign =
However, the value by which I need to shift the image is provided through a URL (the URL is given below for reference), where if I were to run the contents of the URL as JavaScript, the output would be "-8px"
, which is exactly what I need. But how can I implement this? How do I express
verticalAlign={retrieve the URL content, execute as JS, extract the returned value}
.
The specific URL in question is http://latex.codecogs.com/gif.json?\inline%20\mathbb{R}
Here is a sample response that may shed some light on how to approach this:
ParseEqn({ "latex": { "type":"gif", "equation":"\\mathbb{R}", "site":"stackoverflow.com", "file":"f3ed131812d10a06a9349ab2b42e3ed4.gif", "url":"http://www.codecogs.com/eq/f3/f3ed131812d10a06a9349ab2b42e3ed4.gif", "width":"12", "height":"12", "baseline":"1" } });
Your insights would be greatly appreciated!
Sincerely,
Sam