Results 1 to 8 of 8

Thread: do file extensions names have to be same as actual link on web page?

  1. #1
    Join Date
    Jan 2007
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default do file extensions names have to be same as actual link on web page?

    1) Script Title: IMAGE w/DESCRIPTION TOOLTIP

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

    3) Describe problem:
    I have images I want to display using this script which are all in a folder. They are respectively:
    photo1.gif, photo2.gif etc. etc.

    When I create my text link on the page for photo1.gif , I was wondering if I can use another wording, such as DOG IMAGE1, DOG IMAGE2 etc.?
    In essence, is it necessary for the file extension name of the image in the folder I have it stored to be the same as the text it applies to on the actual web page?

  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

    The only places in HTML and in javascript code where the actual filenames are required are those places where the browser needs to know where to find the file. Things like:

    Code:
    src=
    and:

    Code:
    href=
    and (the red part) here:

    Code:
    messages[0] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
    In areas where it is just text that the user sees, you can type anything you like in those places:

    HTML Code:
    >Text the User Sees<
    and (the green part) here:

    Code:
    messages[0] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Also; in addition to what John pointed out above, you can point your anchors (<a> tags) to any page/file you want as long as the image that you want displayed in the tooltip is defined in the javascript code. In other words, you could place a link on your page like so:

    Code:
    <a href="test.html" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">Some text</a>
    Then in the javascript that defines the tooltip content, you could have this:

    Code:
    messages[0] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Jan 2007
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default So in essence . . .

    will I be able to link the file extension name of dog2.gif to DOG IMAGE link text that's on the actual page? Can you recommend the best way? I really appreciate it. Normally, I'll upload my folder of images identified with all appropriate dog3.gif, dog4.gif etc. Then on my page, type the text link of DOG IMAGE1 (for dog1.gif) etc. Correct? So, best way to link is?

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I'm not quite sure I understand what you want to do, but I think this is what you mean:

    Code:
    <a href="dog1.gif" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">DOG IMAGE 1</a>
    Then in the script itself, place this:

    Code:
    messages[0] = new Array('dog1.gif','This is the image of dog 1',"#FFFFFF");
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Jan 2007
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Testing Site:
    Here is what I want to do......upload a folder of images to my frontpage web and all images in folder are identified with file extension names of dog1.gif, dog2.gif, dog3.gif, dog4.gif, dog5.gif etc. etc.
    On my page where I intend to have visitors mouseover the text, and have those intended images pop up, I want dog1.gif to show when mousing over the word I type on the page, being DOG PHOTO1 and I want dog2.gif to show when mousing over DOG PHOTO2 etc. etc.
    So in essence, can I do this according to your instructions? Thanks for all the assistance.

  7. #7
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Yes, what I posted above will do the trick for you.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  8. #8
    Join Date
    Jan 2007
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default for TESTING SITE!

    Thank YOU TS, for kicking butt on my question . . . .

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
  •