Re: OT : Javascript image size undefined
Re: OT : Javascript image size undefined
- Subject: Re: OT : Javascript image size undefined
- From: Graff <email@hidden>
- Date: Mon, 21 Jun 2004 20:19:19 -0400
Yep, this is certainly off-topic for the AppleScript mailing list.
Perhaps the Apple web-development mailing list would be a better fit
for this message? This is certainly a topic that they would be better
suited to answer.
Here's what the web-development mailing list is all about:
<
http://www.lists.apple.com/mailman/listinfo/web-development>
----
About The web-development Mailing List
The web-development mailing list is a forum where both client-side and
server-side developers can discuss their disciplines. It's the perfect
place to look if you're in need of CSS layout tips, JavaScript code
review, help using PHP and Apache, or have any other questions related
to web development on the Mac.
----
- Ken
On Jun 21, 2004, at 3:38 PM, Alisha Outridge wrote:
I am running Webstar 4.2 and I have tried a variety of scripts below
that claim to successfully get the width and height of
any images but they come out "undefined" for me. Is it a Mac server
issue? How does one go around it? the code i am using is below. It
seems the issue is that my browser/server is not preloading the images
as it needs to so it can know the size in time to calculate the width
and height.
<img src="images/buttons/navmenu/about.gif">
// Note: Image shows with direct HTML above so linkage is correct.
<script>
var img = new Image();
img.src = "images/buttons/navmenu/about.gif";
alert("Width = "+img.width+"\nHeight = "+img.height)
</script>
//Note: Width and height are undefined.
The code above is all I have on the page other than the html and body
tags ofcourse. Does anyone know if Webstar blocks this information from
showing up or if you can successfully get the width on your servers of
an image? I know Webstar has quirky security features and I seriously
doubt that I coded the above incorrecftly. I hope I did though! Any
help would be appreciated!
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.