Results 1 to 7 of 7

Thread: trying to have webpage stay in place but keeps adjusting when image loads

  1. #1
    Join Date
    Sep 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default trying to have webpage stay in place but keeps adjusting when image loads

    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
    Last edited by teddyc8201; 09-16-2008 at 07:37 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your loadarea has no specified style height. For that particular page:

    Code:
    #loadarea2 {
    height: 400px;
    }
    seems about right.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    teddyc8201 (09-15-2008)

  4. #3
    Join Date
    Sep 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Your loadarea has no specified style height. For that particular page:

    Code:
    #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?

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    Sep 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    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.

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In thumbnailviewer.js, change:

    Code:
    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:

    Code:
    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 . . .
    Last edited by jscheuer1; 09-18-2008 at 05:59 AM. Reason: consistency in code formatting
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    teddyc8201 (09-17-2008)

  9. #7
    Join Date
    Sep 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    wow once again you have helped greatly!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •