/    Sign up×
Community /Pin to ProfileBookmark

php get image height without the use of input box?

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

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@lehulaauthorAug 15.2007 — Nm Got It. Didn't Know There Was A Getimage()
×

Success!

Help @lehula spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...