PDA

View Full Version : trying to have webpage stay in place but keeps adjusting when image loads



teddyc8201
09-10-2008, 07:30 PM
im using cmotion javascript and using a loadarea to have the image appear in the same section. The problem is that the page adjusts when trying to load the next images from the cmotion. I was wondering if anyone knew of a way to prevent the page from adjusting

Here is the example: Example Page of the site (http://www.bikebuildersbible.com/brakes/b66.php)

jscheuer1
09-11-2008, 04:33 AM
Your loadarea has no specified style height. For that particular page:


#loadarea2 {
height: 400px;
}

seems about right.

teddyc8201
09-15-2008, 07:38 PM
Your loadarea has no specified style height. For that particular page:


#loadarea2 {
height: 400px;
}

seems about right.

yep that just about did it, i have one more question ,the height stays in place but the image within the code has title which is generally on the bottom of the image, is it possible for me to have the text title above the image instead?

jscheuer1
09-16-2008, 01:56 AM
I'm sure that would be a fairly simple matter, just put the code for the caption/title before the code for the image. I cannot be specific at this point though because I cannot find your demo page at the moment. Either there is a temporary network problem, or you have removed it.

teddyc8201
09-16-2008, 07:37 PM
I'm sure that would be a fairly simple matter, just put the code for the caption/title before the code for the image. I cannot be specific at this point though because I cannot find your demo page at the moment. Either there is a temporary network problem, or you have removed it.

oh the link was just recently modified and moved into a subfolder, sorry about that fixed the link.

jscheuer1
09-16-2008, 10:25 PM
In thumbnailviewer.js, change:


loadimage:function(linkobj){
var imagepath=linkobj.getAttribute("href") //Get URL to enlarged image
var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0]) //Reference container on page to show enlarged image in
var dest=linkobj.getAttribute("rev").split("::")[1] //Get URL enlarged image should be linked to, if any
var description=(thumbnailviewer2.enableTitle && linkobj.getAttribute("title"))? linkobj.getAttribute("title") : "" //Get title attr
var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image
if (typeof dest!="undefined") //Hyperlink the enlarged image?
imageHTML='<a href="'+dest+'">'+imageHTML+'</a>'
if (description!="") //Use title attr of the link as description?
imageHTML+='<br />'+description
if (this.iefiltercapable){ //Is this an IE browser that supports filters?
showcontainer.style.fil . . .

to:


loadimage:function(linkobj){
var imagepath=linkobj.getAttribute("href") //Get URL to enlarged image
var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0]) //Reference container on page to show enlarged image in
var dest=linkobj.getAttribute("rev").split("::")[1] //Get URL enlarged image should be linked to, if any
var description=(thumbnailviewer2.enableTitle && linkobj.getAttribute("title"))? linkobj.getAttribute("title") : "" //Get title attr
var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image
if (typeof dest!="undefined") //Hyperlink the enlarged image?
imageHTML='<a href="'+dest+'">'+imageHTML+'</a>'
if (description!="") //Use title attr of the link as description?
imageHTML=description+'<br />'+imageHTML
if (this.iefiltercapable){ //Is this an IE browser that supports filters?
showcontainer.style.fil . . .

teddyc8201
09-17-2008, 09:17 PM
wow once again you have helped greatly!