Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Image Stretch

 

 


justritedesign
User

Jun 9, 2008, 2:17 PM

Post #1 of 3 (191 views)
Shortcut
Image Stretch Can't Post

I have a page layout that has a series of thumbnails and one main image that is one of the thumbnails.
The thumbnails can be clicked and the main image is set to swap for the clicked image. The problem comes from the height of the main image that loads on the page. The size that the main starting image stays that same even though another thumbnail that is clicked requires different dimensions.

http://www.willmarairservice.com/testphp3.php?1990_Mooney_M20M_TLS_Bravo-11/

Code involved:

Code
<table width="100%" border="0" cellpadding="5" cellspacing="0"> 
<tr>
<td valign="top"><?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'uploads', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="0" onmousedown="MM_swapImage('picture','','<?php echo $upload['urlPath'] ?>',1)" />
<!-- <span class="t12_white"><?php echo $upload['info1'] ?></span><br />-->
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['info1'] ?></a><br/>
<?php endif ?>
<?php endforeach ?> <br/></td>
</tr>
<tr>
<td valign="top"><img src="<?php echo $upload['urlPath'] ?>" name="picture" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" id="picture" /></td>
</tr>
</table>


OK the code above is old. I took off the width=" .... and height=" .... tags and it seems to work fine.

New Code:

Code
<table width="100%" border="0" cellpadding="5" cellspacing="0"> 
<tr>
<td valign="top"><?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'uploads', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="0" onmousedown="MM_swapImage('picture','','<?php echo $upload['urlPath'] ?>',1)" />
<!-- <span class="t12_white"><?php echo $upload['info1'] ?></span><br />-->
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['info1'] ?></a><br/>
<?php endif ?>
<?php endforeach ?> <br/></td>
</tr>
<tr>
<td valign="top"><img src="<?php echo $upload['urlPath'] ?>" name="picture" " id="picture" /></td>
</tr>
</table>


Is there a way to set the sizes needed for each thumbnail clicked into the main image so it will not stretch or squish? Otherwise I will just keep it the way it is now.

Thanks
Michael Moyers
Owner/Administrator
Just Rite Design & Just Rite Productions
A growing network of professionals in Web development, Programming, Graphic Design, Flash, and Audio and Video Productions


Dave
Staff / Moderator


Jun 9, 2008, 2:39 PM

Post #2 of 3 (190 views)
Shortcut
Re: [justritedesign] Image Stretch [In reply to] Can't Post

Hi Michael,

It doesn't look like the MM_swapImage() function you're using lets you specify height or width when swapping an image. If you could figure out a way to make this work in plain HTML then we could do it in CMS Builder.

Looks like the best way for now might be to just leave the height and width undefined as you have now.

Dave Edis - Senior Developer
interactivetools.com


justritedesign
User

Jun 9, 2008, 2:42 PM

Post #3 of 3 (189 views)
Shortcut
Re: [Dave] Image Stretch [In reply to] Can't Post

Ok Great! Thats what I was thinking when I changed the code earlier. But I thought I would ask anyway.

Thanks for checking it out.
Michael Moyers
Owner/Administrator
Just Rite Design & Just Rite Productions
A growing network of professionals in Web development, Programming, Graphic Design, Flash, and Audio and Video Productions

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4