Results 1 to 5 of 5

Thread: Image Thumbnail Viewer script - image shown as link which is not a link

  1. #1
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer script - image shown as link which is not a link

    1) Script Title: Image Thumbnail Viewer II script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem: Picture shown as link which is not a link.

    On my website I used the a.m. script, see http://www.arti-mo.com/kunstenaars.htm.

    Of course I have customized it and now when you move the mouse over the names of the artists on the right, at the same time on the left there is an artwork shown that has been made by the corresponding artist. When you click on the name of the artist a new page will be opened with details about that artist.

    The problem is this: when from the name of the artist you move the mouse to the picture on the left, it looks as if also that picture is linked to another page. But this is not the case.

    (1) The first solution I thought of was to get also the pictures linked. I tried this in several ways, but it blocked the script from working correctly.

    (2) Another solution would be that the picture doesn't show a link attached to it, which basically means the mouse picture won't change when hoovering the picture, but I don't know how to do that.

    Can someone help me to solve this please?

    Thanks and kind regards,
    Monique

  2. #2
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hello there,

    Is there someone there, who knows a solution to my huge "problem" please???

    Thanks,
    Monique

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,030
    Thanks
    44
    Thanked 3,211 Times in 3,173 Posts
    Blog Entries
    12

    Default

    Didn't I tell you about that purple posting?

    For no links, use this syntax (additions red) for each array entry:

    Code:
    dynimages[0]=["kunstenaars/aso.jpg", ""]
    If you do want a link, do it like so:

    Code:
    dynimages[0]=["kunstenaars/aso.jpg", "kunstenaars/aso.htm"]
    - John
    ________________________

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

  4. #4
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hi -John,

    All best wishes for 2007! Hopefully it will be a year of better understanding webdesignlanguage!

    What's wrong with the purple posting? Don't you like it? Maybe it helped me to get my answers?

    Thanks for your precious advice. It is exactly what I needed.

    Can I ask you another nice question?

    When on my site you go from one page to another, ie. from the overview of artists (http://www.arti-mo.com/kunstenaars.htm) to one of the artist pages ie. one on the bottom Till Willems (http://www.arti-mo.com/kunstenaars/twi.htm) and than you click previous page, the previous page is loaded again from top. Is there a way to go back to the previous page and then on the same height you were before?

    Bye,
    Monique

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,030
    Thanks
    44
    Thanked 3,211 Times in 3,173 Posts
    Blog Entries
    12

    Default

    What got my attention was the fact that the same person had responded to their own message, asking again for help. This is known as a 'bump' and is fine as long as your original post was clear and went unanswered for a few days.

    Using stylized and/or colored text should be reserved for clarity in code or instructions, and there only as a shortcut. You should be prepared to later explain, just in plain words, what the style or color meant. The reason being that once you deviate from normal text, you can no longer be assured that any given browser will see it in the way it was intended. It may even be illegible.

    Now, on to your new question -

    I am assuming you mean the link(s) to kunstenaars.htm from an artist's page. If you didn't have the scrolling inset division (tekst), you could use a named anchor and may still be able to do so, in some fashion but, I doubt it. Setting the scrollTop value of the tekst division will work in most current, javascript enabled browsers:

    Code:
    document.getElementById('tekst').scrollTop=100;
    Where 100 is the approximate number of pixels scrolling you want the division to do. Passing that information from the artist's page back to the kunstenaars.htm page is easy but using it is a little tricky, depending upon what else is going on, script/wise on the kunstenaars.htm page. To pass the information back with the link(s) to kunstenaars.htm on an artist's page, use:

    Code:
    <a href="kunstenaars.htm?scrollvar=100">kunstenaars</a>
    or similar. Once again, 100 is the amount of scroll you want to pass along.

    Putting this in the head of kunstenaars.htm:

    Code:
    <script type="text/javascript">
    function scrolldiv(){
    document.getElementById('tekst').scrollTop=parseInt(get('scrollvar'));
    }
    function get(key_str) {
    var query = window.location.search.substr(1);
    var pairs = query.split("&");
    for(var i = 0; i < pairs.length; i++) {
    var pair = pairs[i].split("=");
    if(unescape(pair[0]) == key_str)
    return unescape(pair[1]);
    }
    return null;
    }
    if (location.search&&get('scrollvar')!=null)
    if ( typeof window.addEventListener != "undefined" )
        window.addEventListener( "load", scrolldiv, false );
    else if ( typeof window.attachEvent != "undefined" )
        window.attachEvent( "onload", scrolldiv );
    else {
        if ( window.onload != null ) {
            var oldOnload = window.onload;
            window.onload = function ( e ) {
                oldOnload( e );
                scrolldiv();
            };
        }
        else
            window.onload = scrolldiv;
    }
    </script>
    should pick up the value and use it without interfering with most other scripts, if any, on the page.
    - John
    ________________________

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

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
  •