Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 2
There are 1 users currently browsing forums.
JavaScript Coding JavaScript allows rich, browser-based web-applications with interactivity and complex visual effects. For discussion on JavaScript, use this forum.

Reply
  #1  
Old 09-26-2006
chrisxkelley's Avatar
A Toddler - Don't be Fooled!
 
Join Date: Jan 2005
Location: Arroyo Grande, California
Age: 20
Posts: 35
Rep Power: 0
chrisxkelley is on a distinguished road
image width and height

Does the Image() class/object have an event handler for onLoad, and when this event fires, is it possible to get the width and height of the image?My objective is to be able to put the correct width and height attributes into an img element. it works in every browser i've tested but my client is telling me that some users on his site are seeing the images at a very small resolution, i'm assuming 32x32 because that's the default image size.. i think.

any suggestions? there might be something wrong with my class file, also. it's for a dynamic image menu. it's here: http://firelitehosting.com/~admin/ImageMenu.js


thanks,
chris
__________________
.firelitedesign
Reply With Quote
  #2  
Old 09-27-2006
Graduate Student
 
Join Date: Aug 2005
Location: In trouble, (England)
Posts: 329
Rep Power: 5
Codejunkie is on a distinguished road
Re: image width and height

Of the top of my head, yes im sure you can embed an object of type image that can be fired onload.

As far liquid resizing goes, as you probably have guessed you need to sniff the browser and resize the img in Css, i would have thought if you fire a custom object that contains these methods onload, you can get the size and do.......

Sorry its not a very comprehensive answer, but its 04:16am !
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Height Issues fullphaser HTML/CSS Coding 4 06-27-2006 12:37 PM
Image into subimages StarIsFar Java Programming 5 04-09-2006 04:05 PM
Image size (width/height) Markpyro PHP Scripting 2 03-02-2006 06:42 PM
Any Help with that StarIsFar Java Programming 13 12-14-2005 04:20 PM
resize uploaded picture darkecho PHP Scripting 7 08-28-2005 03:01 PM