Web Design and Development Forums

dynamic column resizing

This is a discussion on "dynamic column resizing" within the JavaScript Forum section. This forum, and the thread "dynamic column resizing are both part of the Program Your Website category.

Old May 1st, 2008, 15:40   #1 (permalink)
New Member
 
Join Date: Sep 2007
Location: Romford, UK
Posts: 4
dynamic column resizing

Hi,

I'm very much a novice with scripting, and I'm trying to resize a column's length to match the main content column.

After much playing, I've come up with this:

Code: Select all
function matchHeight(){
    var bigColumnHeight=document.getElementById('content_topBG').offsetHeight;

    document.getElementById('sideBG').offsetHeight=bigColumnHeight;
        
}
The function is called on load. Please could somebody explain why this doesn't work? It's the assignment that I'm having trouble with.

Thanks,
Andy
uzilover is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 16:24   #2 (permalink)
New Member
 
Join Date: Sep 2007
Location: Romford, UK
Posts: 4
Re: dynamic column resizing

Please help. I expect to feel daft, so be honest. What have I missed?
uzilover is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 11:03   #3 (permalink)
New Member
 
Join Date: Sep 2007
Location: Romford, UK
Posts: 4
Re: dynamic column resizing

Now I'm trying with:

Code: Select all
function matchHeight(){
    var bigColumnHeight=document.getElementById('content_topBG').offsetHeight;
    newHeight=(bigColumnHeight-750);
    document.getElementById('sideBG').style.height=newHeight;
}
Please help.
uzilover is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 15:06   #4 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 715
Blog Entries: 2
Send a message via Skype™ to aso186
Re: dynamic column resizing

1. Check your ID's in your HTML match (remember they're case sensitive)

2. Check the function is actually loaded and the height value is correct - use;
Code: Select all
alert(newHeight);
at the end of your function. If you get no message box when you load the page, something's wrong with your onload function.

3. Using Firefox? Got Firebug or the Web Developer Toolbar? You can use these to check if there's an issue with your JavaScript.

4. This is the most useful - with the web developer toolbar you can view the generated source (the HTML generated with JavaScript) and see if your styles are actually being set.
aso186 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
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
resizing.... jjgamepro17 HTML Forum 3 Apr 18th, 2007 20:22
Resizing Pictures Accurax CSS Forum 9 Dec 14th, 2006 18:05
Resizing the pages? tolis CSS Forum 1 Oct 14th, 2006 19:53
Resizing a movie in a div Pizz360 CSS Forum 3 Oct 9th, 2006 17:15
..copy data from column A in Table A to column B in Table B? gecastill MSSQL & Access 10 Jun 23rd, 2005 18:27



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 20:12.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59