Image Calling Problem Solved - I was having issues trying to call an image from a folder.

free web hosting
Open Discussion > CONTRIBUTE > The Internet > Web Design

Image Calling Problem Solved - I was having issues trying to call an image from a folder.

blackhatdacx
Alright so this is for example

You'd have a site and the structure is like this.

http://www.url.com/
a folder of images /images/
and some pages in this parent directory.

However, I have another folder so it's

http://www.url.com/other/
and this index page needs to call things from
http://www.url.com/images/
and it can't.

It won't load. I've had the call be to
CODE
<img src="images/"
or
<img src="../images/"
and
<img src="http://www.url.com/images/"


It doesn't work. I can't call to the URL 'cause the server dosen't allow remote calling, changing that is not an option.

It won't call from a directory cause it'll think it's that directory it's calling in
like it'd goto http://www.url.com/other/images not http://www.url.com/images

and I can't make it go back, it only works for server side stuff, and I'm going like a background image for example.
Why would I need to call a server side to bring in a background image.

I went back and I figured that the problem was because the code was without a / in the folder call
CODE
<img src="/images/


So let this be a lesson learned! If you are not getting the result you want. Make sure to check and check and check and check again your code. The solution is in the environment.

 

 

 


Reply

jlhaslip
Couple of things to add to this discussion.

1. The href is incomplete. You are lacking the file reference in the sample code. I added file_name.jpg to correct it.
2. You are missing the title attribute, which acts as the 'tooltip' for the on-hover event. I added that.
3. You failed o close the image tag. I added it, too.

Your html code should read as follows:
CODE
<img src="http://www.url.com/images/file_name.jpg" title="Title here" />
<img src="./images/file_name.jpg" title="Title here" />
<img src="../images/file_name.jpg" title="Title here" />

Depending on the position of the Images folder relative to the calling file, one of those should work.
The "./" is if the Image is referenced from the same folder. Likely so in your case.
The "../" is if the Image is referenced from 'up' one folder and then into the Images folder.
The Http reference is 'absolute' to the URL. The thing to use if the Images are stored on a Web Server outside your Domain, for example, but it could also be the same Domain.
Using the first or second example makes your code more portable, in that the reference is relative to the html page and does not tie the Image source to a particular Server location.

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. crimson room safe code - 63.36 hr back. (5)
Similar Topics

Keywords : image, calling, problem, solved, issues, call, image, folder,

  1. Cascading Windows
    How do I make the image? (5)
  2. Image Anywhere
    (2)
    I want to know how to put an image anywhere in the page using HTML/JavaScript. Please Help.....
  3. Image Not Taking The Right Size In Web Page
    An image is correct when designed, but not when put in a website (1)
    When trying to make a web page with a GIF image on it which runs a coloured bar along the top and a
    coloured curve along the side, I come across the weird thing that, when I put the image on a web
    site, it does not take in the whole top and does not run from top to bottom completely. The image is
    made in Adobe Photoshop at a resolution of 1024X768 pixela and looks correct , ie. the horizontal
    bit runs completely from left to righ and the vertical bit completely from topright to bottom right,
    yet when put in to the web page, it shows with big margins left and right and to....
  4. What Do You Prefer? A Subdomain Or A Url With A Folder Name?
    (16)
    Hi everyone, please see the poll and respond! Let me elaborate here, say if there was a
    website, the url itself was around 6 or 7 letters long such as trap17.com, that sort of length, now
    would you prefer to see a subdomain on this site, such as sub.site.com or have a folder name in the
    URL like site.com/sub, I want the URL to be as easy to remember and as catchy as possible and im not
    sure which method would give the best results here. In line with my last post i would appreciate
    any links to a website where i can find information like this. But please respond to....
  5. How Do I Put A Flash Image In My Website
    (10)
    oke i got flash now and i made this button http://www.crazydesign.trap17.com/coolflashthingy.swf
    this button i wanne use for my website now my question is, what do i need to put it online do i need
    a special code or something,i'm not experienced with this,i heard something about a special code
    u need for it,but i dunno wichi'm just used to using tis QUOTE ....
  6. Can't Delete A Folder On Server!
    a small mistake in a script.... (7)
    I maintain my college's website and since I update it frequently, I decided to
    write a php script that would backup all the data in a folder on the server itself. To backup all th
    e data I would only need to run the script once in a while: function dircpy($basePath,
    $source, $dest, $overwrite = false) { print
    "============================================================================ ";
    if(!is_dir($basePath . $dest)) mkdir($basePath . $dest);
    if($handle = opendir($basePath . $source)) {....
  7. Selecting Specific Part Of Image And Adding Description
    Please help (6)
    Many of you would have noticed that on flickr, there's feature that you can select some part of
    the picture (usually there' a small box) and add description for that part when you upload. Can
    someone tell me what kind of feature it is, and how it can be made ? im very keen to learn about
    that. I have attached the image below, there' you can see the boxes on the picture.. i want to
    learn how to make that feature.. please help me. Thanks. Sami. ....
  8. Hoverbox Image Gallery
    a pretty cool way to present Images on a page (1)
    Hoverbox is an Image Gallery which I found some time ago. The feature I like the most about it is
    the effect of the "on-hover" state which changes the image from a small thumbnail size to a
    "mid-size" image. Essentially, it doubles the size of the picture when your mouse hovers on it. The
    Hoverbox uses CSS for the size change and needs no javascript to perform. In fact, it works the same
    without javascript. And... it apparently works in IE. The CSS method used includes 'hiding'
    the larger image until the 'on-hover' state is reached. As you know, IE&#....
  9. How Do You Enlarge An Image?
    (8)
    Hey everyone, I need some help on how to make a small image bigger once you click on it. If you
    know ebay, then you know what I'm talking about. There are always sample pictures of the
    product that the seller is selling. Once you click on the tiny pictures, the tiny picture becomes
    larger. Look below... Also, how do you for example..........click on a link, and the
    link automactically takes you like half page down to see a picture? The link will not take you to
    another page, it wil just take you to a different part of the same page as the link itself....
  10. Making A Scroll Bar In Flash
    with an image and words on it (4)
    does anybody know how to make a scrollbar for my game page I am making on my site. This whole site
    is completely in flash. I know how to make a scrollbar for just words but not when there is an
    image on there also. Does anybody know?....
  11. Use Cell Background Image On Css?
    (2)
    I wanted to have a button that changes the skin/theme of my site using css and php. I've
    already had the php code for switching between two different css but I don't know how to put an
    image background for each cell using css. Can anyone help me? Sample codes would be nice.
    /huh.gif' border='0' style='vertical-align:middle' alt='huh.gif' /> ....
  12. Image Galleries
    Which one to choose ? (10)
    As we all must have noticed that the Fantastico section of our trap17 website admin accounts have 3
    options for Picture Galleries. 1... 4Images Gallery 2... Coppermine Photo Gallery 3... Gallery
    I would like to use one of these, but i am very confused which one to select. Primary selection
    criteria would be The Looks and then safety of image files. also ease of adding images (last) So
    what do you think which one should I go for ? Cheers....
  13. Image Refresh
    (6)
    Hi all, Does anyone know if there is any way to refresh only an image in a webpage? I can't use
    the meta refresh because that would defeat the purpose of this page. If a link to this page is
    needed to see what I mean, let me know. I am using layers and they are dragable by visitors and if I
    refresh the whole page, the layers get reset. kvarnerexpress....
  14. Syndicated Image Feeds
    Need help setting it up and keywords (0)
    I'd like to offer some of my digital photos as syndicated image feeds, but when I search on that
    term, all I get is porn and lottery sites. Maybe I'm calling this the wrong thing. Here's
    what I want to do: Offer "picture of the week" images that people can link to, once, but they
    update, automatically every week. I can do them all different ways--in web page templates, as
    banners, as puzzles (where they see a small part and have to guess what it is), etc. I tried it
    out as a dorky table-based template and it works fine. Here's the link, so you can get ....
  15. Avoid Image Download
    (6)
    Hi guys, I am working on a Web page for a photographic center. They want to show photographs but
    they do not want people to be able to download it. Because some of these photographs are propietary.
    Is that possbile?. Can anyone tell me how can i manage to do that on a Web? thanks in advanced for
    your help!! SAC....
  16. Rollover Image Tutorial
    (2)
    make it so that i have a button, probably an opaque one, and when it is scrolled over it displays
    another image, a solid one. I believe this is a javascript command, and I already have all the
    images set, i just need to know the coding. Thanks for the help.....
  17. Image Splicer?
    (1)
    Ok, question to everybody? Do you know if Photoshop 7 has an included image splicer?...I used to
    have PSP and it had a good one, that generated code for a layout, too. I was kinda
    wondering...because if not, I really should find a free one online... Which brings me to my next
    question...any good splicer/code generator out there, that's free? I really could use one...it
    makes things go so much faster...I mean, doing everything in notepad and all. /biggrin.gif'
    border='0' style='vertical-align:middle' alt='biggrin.gif' /> Thanks in advance to all repliers,
    th....
  18. Move/delete Image On Webpage Automatically?
    (2)
    Hi, Im creating a website that sells carpets and basically ive created webpages with the picture and
    checkboxes underneath the pictures so users can select which carpet they want! Once they submit
    the form, we get the order including form details! The problem is that once the user checks the
    checkboxes, i want to be able to delete that image from that webpage or move that picture to another
    location in the folders i have stored on the server. The reason is becuase evry carpet is unique so
    that two people cant order the same carpet! Now wat is the best way 2 d....
  19. For Anyone Who Wants To Have Compact Image Gallery
    Click here (4)
    Mini gallery ....
  20. Image Weaver
    free flash gallery component (0)
    I was surfing and came across this, and I love how it looks, but I still dunno how to use it, lol.
    Thought I'll share it for those who do. http://imageweaver.buggedcom.co.uk ....
  21. Couple Of Image Minipulations
    (7)
    Couple of nasty pictures ive made from photos which i took. ....
  22. My First Image
    (12)
    Okay i want an opinon on how my first images i have made look. I used fireworksMX to create them.
    First Image 2nd image ....
  23. Image hosting site...
    (12)
    I want to setup a simple web hosting site for something to do, but I dont know where to beguin, does
    anyone know where I can find a whole site ready made, something you can just edit to your taste and
    use? Thank you, cragllo.....

    1. Looking for image, calling, problem, solved, issues, call, image, folder,

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for image, calling, problem, solved, issues, call, image, folder,

*MORE FROM TRAP17.COM*
advertisement



Image Calling Problem Solved - I was having issues trying to call an image from a folder.



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE