• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OT : Javascript image size undefined
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >OT : Javascript image size undefined (From: Alisha Outridge <email@hidden>)

  • Prev by Date: Re: Error with GURL/GURL
  • Next by Date: Re: Error with GURL/GURL
  • Previous by thread: Re: OT : Javascript image size undefined
  • Next by thread: Active application - how to tell?
  • Index(es):
    • Date
    • Thread