Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: new member; coding question

  1. #1
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default new member; coding question

    I just joined this forum, and haven't had time to check it all out yet, so please pardon me if I accidentally make any ettiquette mistakes.

    I am just in the beginning stages of learning to write html, and am playing around with an experimental webpage, using editpad lite, with Internet Explorer (not sure which version, but definitely one of the newer ones) as a browser. I am trying to insert an image (the image belongs to me, it's not a download), and also to use an image as a background (a really simple cloud jpg image, taken with my digital camera).

    I've tried every version of the img tag that I can find, using the w3c html tutorial, a book called the "html bible", and online hp webbuilding classes. I know that my code is correct. But I still can only get the little red x that shows up when the browser can't find the image. The images and the html document are in "my documents", so they're all in the same folder. I can't figure out for the life of me what I'm doing wrong.

    Someone recently told me that it might be because of the security settings on my computer, but they weren't sure what the settings were, or what might need to be changed in order to allow the images to show up on the webpage. Is there any truth in this theory? If so, does anyone have any suggestions?

    Any help I can get would be SO appreciated. I finally got the hang of URL's, but images are making me crazy.

    My sincere thanks,
    Lori (wanderinon)

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

    Default

    What's the code on your page, and what is the directory structure like. Without this, we really can't be of much help (unless you were to post a link to the problem page - although, from what it sounds like, you are working locally without a webserver installed.)

    The only thing I could suggest; without seeing any code or directory structure, would be to make sure you are typing in the "URL" of the image correctly. Either this (as an example):

    Code:
    <img src="C:\Documents&#37;20and%20Settings\User\My%20Documents\image.gif">
    or this:

    Code:
    <img src="image.gif">
    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

  3. #3
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow, that was quick! (I checked the thank you link, I'm not sure what that's all about but I'll figure it out...anyway, I digress)

    Ok, to answer your question as best I can, because I don't quite understand the whole directory path issue completely yet; I'm working on that: The photographs have different names, but I'll start with the background image.

    I went outside and took a picture of the sky. When I uploaded it to my computer, I called it "background.jpeg", to keep it simple, and placed it in "my documents". The code I used was:
    <body background="background.jpeg">

    For the images, it was very much the same type of thing. The image is called "logo.jpeg", and it also is in "my documents". The html document is in "my documents" too, and the code is:
    <img src="logo" width="150" height="150"></img>
    (I put an "end image" tag in at the suggestion of someone I met who writes code and said that sometimes it helps, but he didn't actually see the document.

    These are the only two that I'm working with at the moment, because I want to figure them out, and by doing that, then I'm hoping that I'll understand enough to add the other images.

    Again, thank you so much, I really do appreciate any suggestions. I'm VERY new at this, but I want very much to learn.

    Lori

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

    Default

    Quote Originally Posted by wanderinon View Post
    I went outside and took a picture of the sky. When I uploaded it to my computer, I called it "background.jpeg", to keep it simple, and placed it in "my documents". The code I used was:
    <body background="background.jpeg">
    Does the background image work (meaning are you able to see a background image)?

    For the images, it was very much the same type of thing. The image is called "logo.jpeg", and it also is in "my documents". The html document is in "my documents" too, and the code is:
    <img src="logo" width="150" height="150"></img>
    Two things in that quote. The first is that you didn't specify the src as logo.jpeg. Instead, you simply have logo. The second; to my understanding, there is no (valid) closing img tag. I have been wrong in the past, but I am almost 100% sure that this is the case. Anyways, you would want it to look like this:

    Code:
    <img src="logo.jpeg" width="150" height="150">
    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

  5. #5
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    Does the background image work (meaning are you able to see a background image)?

    No, the background is white. The strange thing is that before I started trying to do this, I used: <body bgcolor="(the number of the color">, and that DID work.



    Two things in that quote. The first is that you didn't specify the src as logo.jpeg. Instead, you simply have logo. The second; to my understanding, there is no (valid) closing img tag. I have been wrong in the past, but I am almost 100% sure that this is the case. Anyways, you would want it to look like this:

    Code:
    <img src="logo.jpeg" width="150" height="150">
    Hope this helps.
    I went to the document and changed it, to reflect what you wrote, and it's still an x. (Interestingly enough, the word code is now on either side of the little red x! lol) I think I had actually tried that variation at one time or another while I was trying to find out what I was doing wrong and changing the code repeatedly, but I can't be absolutely sure, since I've tried so many variations, but no, again, it's still not working.

    That's why I'm wondering if this might be a security issue with my computer, as was suggested to me. Anyway, I shouldn't keep taking up your time, but thank you...I'll keep working on it!

    Lori

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

    Default

    I have never heard of a security setting that would block images. Then again; as said before, I could be wrong. I believe that it when calling items (whether it be a link or an image, etc) it is case-sensitive (spelling?). Check to make sure that it is in fact named logo.jpeg and not a variation of:

    logo.jpg
    logo.JPG
    logo.JPEG
    logo.gif
    logo.png
    logo.PNG
    and some other variations that I should'nt have to list. Other than that, without seeing the code or a link to the site (as said before) really can't be of much help.

    Hope this helps though.

    Added Later: Something else you may want to try would be uploading the files to an actual webhost (or download and install a WAMP server on your computer). Another thing, in IE (what ever version), try the following:

    > Tools > Internet Options > Security (tab) > Intranet > Make sure everything is set to "Enable" or "Prompt" just to make sure it isn't a security setting.
    Last edited by thetestingsite; 03-24-2007 at 05:16 AM.
    "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

  7. #7
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry about that...I answered your background question, but being inexperienced with the quote function and using it wrong, the answer ended up being in the quote itself. It is not working. The background is showing up white, using the code <body background="background.jpeg"> but when I used <body bgcolor="green"> it was green, so you must be right. It must not be a security issue.

    I wish I could post a link to the document, but you're right there too, it isn't being hosted on a server, it's only an experimental page on my html editor.

    The other code is now: <img source="logo.jpeg"> and I took out the </img>, and it's an exact match to the photo name itself. I'm just totally baffled here. But I do appreciate all the time you've taken, and I'll keep plugging away at it. I know it has to be something I'm doing incorrectly, but I will get this if it kills me. <grins>

    Thanks again,
    Lori

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

    Default

    Did you view my edit(s)? If you are still having trouble with it on your local system (without running a webserver), your best bet would be to either download and install a WAMP package for your computer or look into getting a free webhost. Simply to rule out the possibility of it being a coding error. If you want, I can set you up a test account on one of my servers. Let me know, and I will set it up. Or you can view my "tutorial on how to set up WAMP on your home computer by going to mburt's wiki

    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

  9. #9
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    Did you view my edit(s)? If you are still having trouble with it on your local system (without running a webserver), your best bet would be to either download and install a WAMP package for your computer or look into getting a free webhost. Simply to rule out the possibility of it being a coding error. If you want, I can set you up a test account on one of my servers. Let me know, and I will set it up. Or you can view my "tutorial on how to set up WAMP on your home computer by going to mburt's wiki

    Hope this helps.
    Wow...that is the nicest offer! To be honest, we are getting into things that are way over my head, but I'm willing to try anything at this point. I have no clue what a WAMP is, or what to do with it, but I do have one problem with downloading anymore things to my computer, and that is that my disc space it almost used up...I'm trying to figure out what I can get rid of to allow me more space (things like multiple media players and such)...but if you're willing to bear with me, I would be really grateful for the help with a test account. Would it help if we took this to IM? I have aim, yahoo and google talk.

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

    Default

    Sure, take a look at my profile and add me to your yahoo.
    Last edited by thetestingsite; 03-24-2007 at 05:55 AM.
    "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

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
  •