Results 1 to 4 of 4

Thread: image question, how do i make the .htm layout load images from folder?

  1. #1

    Thread Starter
    Registered User struntz's Avatar
    Join Date
    Aug 1999
    Location
    Brockway,Pa,USA
    Posts
    199

    Question image question, how do i make the .htm layout load images from folder?

    Hello everyone!!

    I have been creating a site offline and i created the layout and it works fine just running it off my harddrive but now i want to move the site online, but when i load the files to the web server, i have all the htm. files and images files in differnet folders for instance, i have the folder
    MainLayout
    In this folder it contains the Layout.htm and it also contains all the image files for the Layout, when i try and run it on the server it just has little x's where the images shoul dhave loaded and thats becuase i have to move the .htm file out of the MainLayout folder, how do i still connect the images to the .htm without having to move every image out of the folder?

    Thanks for listening, if you don't understand please tell me to be more clear and i will try to re-write it

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    not sure what your saying,

    but for images you usually use relative path

    example:

    ../../images/myPic.jpg

    this go up two level and go into the folder images!

  3. #3

    Thread Starter
    Registered User struntz's Avatar
    Join Date
    Aug 1999
    Location
    Brockway,Pa,USA
    Posts
    199

    hm...

    I think you almost got it but it still doens't work, okay here is a snipet from my site,
    Code:
    <body background="C:\My Documents\Site\htmlFormat\images\microchip1.jpg" onLoad="MM_preloadImages('Layout_r2_c4_f2.gif','Layout_r4_c3_f2.gif','Layout_r6_c2_f2.gif','Layout_r8_c3_f2.gif');">
    <table border="0" cellpadding="0" cellspacing="0" width="800">
    Do u see where it says 'Layout_r2_c4_f2.gif' well that image file is in a folder called MainLayout, the MainLayout.htm file is not in that folder, its out of the folder, how can i make the MainLayout.htm file reconize the images in the MainLayout Folder?

    i tried
    '../MainLayout/Layout_r2_c4_f2.gif'
    and that didnt' work do u know the solution? THanks again!

  4. #4
    scoutt
    Guest
    well without knowing what/where your folders are I will take a guess. you have folders like this
    Code:
    My Documents
           Site
              htmlFormat
                   images
                       microchip1.jpg
                   MainLayout.htm 
                   MainLayout
                       Layout_r2_c4_f2.gif
    ok by the way it is layed out above you have htmlFormat as a folder and you have images and MainLayout folders in that folder. your graphics you want to load are in the MainLayout folder while you MainLayout.htm is in the htmlLayout folder. following me??

    so you were close when you said
    ../MainLayout/Layout_r2_c4_f2.gif

    But you aren't going up a folder. the ../ means you go back to the original folder you were in. so lets say I was in MainLayout folder and I did ../ I would be in htmlFormat folder. what you want is (from the outline above) just "MainLayout/Layout_r2_c4_f2.gif"

    did you follow, if not don't be affraid to ask more questions.

Posting Permissions

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



Click Here to Expand Forum to Full Width