I’m looking around and it looks like there is lots of good info on pulling a var from php and using it in javascript, but no the other way around. All the info I can find says to just use hidden input boxes to hold the data, then post them with a submit button. But I have like 40 images, and I want to store their ‘left’ ‘top’ width’ height’. Thats a lot of hidden input boxes to write (160+). It would be nice not to have those html’d into my script. Is there anyway to get the image height and set it as php data without a input box?
Example:
NOT THIS —–>
<form method=”post”>
<input style=”display:none” name=”some image height”>
<input submit>
</form>
THIS ——->
document.getElementById(“some image”).height = $post_imageheight[];
I’m not sure if I explained this clearly enough. Let me know if you need more detail. thanks