473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Call javascript with table cell dimensions

I have an image inside a table cell.

I'd like to scale the image to fill the cell.

I have a javascript routine that can change the image's height but can't
seem to fine a place to call it with the cell dimensions not equal to zero.

Got any ideas where?
Thanks
Jul 31 '08 #1
2 1777
Why don't you just specify the height in percentage?

If you care about different browsers, you may want to test it to see if all
of them handle image percentage height in the same way.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"AAaron123" <aa*******@road runner.comwrote in message
news:eX******** ******@TK2MSFTN GP03.phx.gbl...
>I have an image inside a table cell.

I'd like to scale the image to fill the cell.

I have a javascript routine that can change the image's height but can't
seem to fine a place to call it with the cell dimensions not equal to
zero.

Got any ideas where?
Thanks


Jul 31 '08 #2
It may be the width that should determine the size (or maybe the height).

But more importantly: As you may have guessed, I'm new at web development. I
wanted to try some javascript. I tried calling it in the onload event of the
image and other places but the cell sizes are always zero. (used debugger so
that I could check the values)

thanks

"Eliyahu Goldin" <RE************ **************@ mMvVpPsS.orgwro te in
message news:OA******** ******@TK2MSFTN GP03.phx.gbl...
Why don't you just specify the height in percentage?

If you care about different browsers, you may want to test it to see if
all of them handle image percentage height in the same way.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"AAaron123" <aa*******@road runner.comwrote in message
news:eX******** ******@TK2MSFTN GP03.phx.gbl...
>>I have an image inside a table cell.

I'd like to scale the image to fill the cell.

I have a javascript routine that can change the image's height but can't
seem to fine a place to call it with the cell dimensions not equal to
zero.

Got any ideas where?
Thanks



Jul 31 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1890
by: Adam | last post by:
Hi all, OK, I'm baffled. I have a menu in a table which I've just realized is "breaking apart" in Safari: http://www.fitcityforwomen.com/00-intro/index.html Yet when I plunk the menu by itself into its own "test" page, it holds together fine:
3
5897
by: N. Demos | last post by:
I have a single row table with fixed dimensioned cells nested inside a fixed dimensioned div, which has overflow: hidden. The div's dimensions are such that It should only display the first two table cells. This all renders correctly in MSIE 6.x, but doesn't in Firefox. In Firefox, the cell widths are reduced so that all the cells are...
7
3590
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
3
58246
by: effendi | last post by:
Hi Can any tell me what is the javascript equivalent of CSS border? I would like to change the border of my cell when it is set on focus. I have tried onFocus="style.border='3px'" but it is not working. Thanks
3
4743
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
136
9282
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
4
6313
by: bboyle18 | last post by:
Hi, I am working with a table sorting script which can be found here http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting This script works very nicely, but when there is a large amount of data to sort e.g > 200 then there is a slight delay in the table sort. To cater for this I want to provide some feedback to the...
9
2601
by: Daniel Kabs | last post by:
Hello there again! On my quest to remove layout tables in favor of CSS controlled elements, I am faced with quite a problem. A table cell that has no explicit width attribute set usually adapts its width to accommodate the content nicely. This is not the case when the content contains floats. I guess floats do not contribute to the...
2
3811
by: Jukka K. Korpela | last post by:
Sub titulo "Re: DIV borders different in IE7 when in td" scripsit Ben C: This seems to be the heart of the matter, and I'm trying to get a real discussion started, by moving the discussion to the right group (c.i.w.a.stylesheets) and changing the Subject line. It seems to me that IE 7, specifically in "standards mode" (!), misbehaves...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.