Jump to content
  • Announcements

    • boen_robot

      Guidelines and Netiquette   03/28/2017

      Posting Problems:   Having problems posting your topic? Read through this: To join, you agree to our terms and conditions and fill out and submit a registration form. An activation email will be sent to your email adress, so you'll need to verify your account. After that the account has to be validated by one of the moderators. This will mean that it can take up to a day to be activated. A couple of things to remember to ensure approval: Don't use an email address in one of those $2 four character .com domains eg. xyds.com. These will be deleted and the domain added to the banned list. Don't use an email address that is within a domain with a bad reputation for spam. A Google search is run on every email address and email domain. Don't sign up with an email address that doesn't exist, doesn't work or requires the sender to answer a quiz before their email can get to you. Put your country and or state and city in the signup form. Blank forms will go to the botton of the "to do" list. And make sure that your email address and your country match, saying you're from Alabama and using a .ru email address is not going to get you activated. After a membership is activated the first few posts will be monitored. Posting spam or unapproved topics described in the agreement results in an immediate ban. The email provider and the IP addresses associated with the account will be banned and all posts will be deleted. These strict measures have been deemed necessary to hinder spam. Sorry for any inconvenience this causes, but it's not liable to change. If, after reading this, you still can't post and don't understand why, contact one of the Moderators listed here.   Topic Guidelines   Including the following information can expedite an accurate response from board members: Must be a Specific Problem or Question related to web design and development Include Code in Question (wrap with   for small blocks of code and for longer blocks   ) Include Code Author Include Extra Notes/Modifications/Attempts Include web link to page/file when possible Content Guidelines   You may not post, upload, link to, or email any Content that contains, promotes, gives instruction about, or provides prohibited Content. Prohibited Content includes any Content that breaks any local, state, county, national or international law. Prohibited Content also includes: No direct or indirect advertising or websites, forums, products, services No hijacking of posts (do not post your question in someone elses) Content that infringes upon any rights [ex. MP3s and ROMs] (including, but not limited to, copyrights and trademarks) Abusive, threatening, defamatory, racist, or obscene Viruses or any other harmful computer software False Information or libel Spam, chain letters, or Pyramid schemes Gambling or Illicit drugs Terrorism Hacking or cheating for internet/online games Warez, Roms, CD-Keys, Cracks, Passwords, or Serial Numbers Pornography, nudity, or sexual material of any kind Excessive profanity Invasive of privacy or impersonation of any person/entity Hacking materials or information Posting Tips   There are more BBcodes than there are buttons for on the reply menu. To get the full list, click "BB Code Help" underneath the clickable smilie face menu. Use   for small snippets of code Use   for lengthy snippets of code Use   if your snippet is HTML (optional) Use   if your snippet is SQL (optional) Rules of Conduct   Be nice. There's no need for calling someone stupid if they ask an 'easy' question. Keep your avatars and signatures absolutely child friendly. We have a younger audience on this forum. Keep your language appropriate for the same reason above. Do not PM moderators for help on the forum. Post on the topic, or create a new one.   Spam:   Recently, as you have all without doubt noticed, we have had lots of spam and advertisement on the forum. Therefore, we'd like to alert you as to what to do when you have found any of the aforementioned annoying messages: it. Immediately. Give a clear reason, please, if the advertising is not evident. DO NOT POST! Report, let the post stay as is, and we will get to it, meanwhile if you continue to post as normal in the other threads, it won't be on the top so long. Refrain from PMing the member. This won't help at all, as they are most likely spambots anyway. Thank you.       Images in signatures:   After thinking of users on dial-up, we have decided to enforce the following rules regarding signatures. Please pay heed to them. Respecting these rules is respecting the members on this forum with dial-up. Signature rules: No animated images AT ALL. No matter the amount of animation. Maximum image widthxheight: 300x150 Maximum image (file) size: 15kb Use calm colors. Do not use highly contrasting images in your signature, as this can get really annoying when seeing several posts from one member in the same thread. The same prohibited content goes for images as for posts. Lastly, use common sense. No lengthy signatures please. Save us some scrolling. Thank you.       Links in signatures:   Please understand that w3schools.com only exists because of voluntary work and is barely supported by the advertising littered throughout the tutorials and the forum. So, please, stop advertising other sites. DO not post links that drive traffic away from the w3schools domain - especially to a site that offers similar if not identical information. Please help support the site by keeping individuals on it. Thank you. Here are some guidelines as to what you can put in your signature: w3schools links --> allowed w3.org links --> allowed browser links --> allowed html editor links --> allowed personal sites --> allowed tutorial sites competing with w3schools --> NOT allowed sites completely irrelevant to webprogramming and this forum --> NOT allowed   Thanks for understanding, and for taking the time to read this. ~W3Schools Modstaff~
st.chalz

images

Recommended Posts

st.chalz    0

I would be gratefull to get a step by step guide to solving this minor problem of which in know is not an issue for most of you guys.am a newbie.

actually i am developing locally on my IIS 8. have been able to produce .html files, but when it comes to attaching images to the web pages i always have a small box with a broken link.how do solve this problem or where do i need to go to on my system to locate this problem

Share this post


Link to post
Share on other sites
Ingolme    798

That just means that the URL you linked to for the image is incorrect. What does your <img> tag look like?

Share this post


Link to post
Share on other sites
st.chalz    0

Summary of the image issue

1; Am actually using the NOTEPAD on my computer to assemble codes for my web development.i have created an index.html file and stored it on my desktop

i.e ( in a web folder) accordingly.

2; furthermore, i tried to include images to the webpage(index.html file) so as to make the "index web page" look attractive. now i took the following steps:

a)i inserted this <img src="photo0537_001.jpg" alt="jpg file" style="width:304px;height:228px"> into my index.html file which is on my NOTEPAD,

but when i try to view it on my web folder; it would show me an image box with no picture in it.

B) now the image am actually trying to place on my webpage is on my desktop i.e (pictures folder).

NOTE: the issue, now is i dont know if that could be the correct location to fetch images from in other to place on my webpage. or are there other alternatives.

2ndly, am developing offline i.e using my IIS 8 webserver.

 

I will highly esteem your swift response as to your candid advice to this minor issue.

 

 

 

Share this post


Link to post
Share on other sites
davej    244

Yes, but now photo0537_001.jpg must be in the same folder as index.html

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><title>index.html</title><style>body{background-color:#777;}</style></head><body> <img src="photo0537_001.jpg" alt="jpg file"  style="width:304px;height:228px"/></body></html>

Share this post


Link to post
Share on other sites
davej    244

Well, I don't know what you are doing. What is a NOTEPAD? If the index.html file and the jpg file are both on your desktop then you should be able to see the image. Try...

<img src="http://www.orseu-concours.com/54-189-thickbox/epso-numerical-reasoning-test-2-en.jpg" alt="jpg file"  style="width:304px;height:228px"/>

Share this post


Link to post
Share on other sites
dsonesuk    712

Have you set up you desktop folder as a virtual folder within IIS 8? Otherwise you would have to use file///c:/users/username/desktop/webfolder/index.html.When using notepad you have to make sure you save it as UTF8 Encoded, also make sure you have saved it as .html and not ,html.txt, this can happen if hide known file extensions is used, so even though you see myfile.html it is really myfile.html.txt.

Share this post


Link to post
Share on other sites
st.chalz    0

Well, "davej" this is is what my code looks like in my NOTEPAD...

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>PHP Demo</title><link href="Site.css" rel="stylesheet"></head><body><div id="main">  <header>  <h1><b>Flexmall.com</b></h1>  </header><nav id="nav01"></nav><h2></h2><div id="nav"><h2><b>Bulleting</b></h2><hr><p>Pages (HTML)</p><br><p>Style Sheets (CSS)</p><br><p>Computer Code (JavaScript)</p><br><p><a href='about.html'>why you would like to know us</a></p><br><p><a href='Motivationals.html'>Motivationals</a></p></div></br><img src="photo0537_001.jpg" alt="jpg file"  style="width:304px;height:228px"/><div id="footer"><footer id="foot01"></footer></div></div><script src="Script.js"></script></body></html>

 

Now all are visible when i view it in the webfolder , but the IMAGE element isnt visible... that is just the problem am experiencing

Share this post


Link to post
Share on other sites
st.chalz    0

"DSONESUK" i would be glad if you would direct me on how to go about setting up my desktop folder as a virtual folder on IIS 8. or where to input this, file///c:/users/username/desktop/webfolder/index.html. as u adviced.

Share this post


Link to post
Share on other sites
Ingolme    798

Whenever you copy your HTML page to somewhere new you must copy all of the resources it's linked to as well.

 

Make sure the image is in the same folder as the HTML file and that it has the same file name as what you've written in the src attribute.

Share this post


Link to post
Share on other sites
davej    244

You say you are...

 

"developing locally on IIS 8"

 

...but what does that mean to you? You also say you have...

 

"created an index.html file and stored it on my desktop"

 

...which doesn't make any sense if you are using IIS.

 

What are you typing into the address bar of the browser?

 

Are you absolutely certain the html file and the jpg file are in the same folder? Have you examined the file properties to verify the image filename? Hopefully you have disabled the folder option which hides known file extensions?

Share this post


Link to post
Share on other sites
st.chalz    0

Godday "DAVEJ", okay let me clear myself on this, before i started developing on my PC. i did the following,

1; i created a folder on my desktop as (Newfolder web)..

2; i assembled some code on my NOTEPAD of which the first i saved and stored as (index.html) on my desktop(Newfolder web).

3; so anytime i want to view the index.html file as a web page, i would simply locate the (Newfolder web) and then click on the Home page. there and then

i can now see it as a typical website page like Flexmall.com. but i couldnt see the Image element i inserted.

Share this post


Link to post
Share on other sites
dsonesuk    712

Desktop? desktop as in the screen you see on opening your O/S as you can save folders and files to this, OR as general the whole desktop PC where you are creating web folders on the C: drive.

 

When you install IIS it by default creates a c:inetpub folder within that there is a www folder where you place your web folders and access it by entering localhost/webfoldername/ (NOTE: no spaces in folder name) and if you have a file going by index.* or default.* with extension *.htm, *.html, *.asp, .aspx it should open this page.

 

I'm going back here, but you use to be able to right click a folder and set that folder as web folder, with a alias name, and adjust permissions to read, write, and execute from that folder OR access IIS and set these there , I think now it is all done through IIS now, but you would only do this if you wanted to use a folder other than the c:inetpub that as said is created automatically on installation.

 

Images

image file names MUST match exactly as image01.jpg is treated as different picture if referenced in src of img tag as image01.JPG, same with IMAGE.jpg compared to image.jpg these will be treated as two different images

Share this post


Link to post
Share on other sites
davej    244

 

"i would simply locate the (Newfolder web) and then click on the Home page."

 

Then you aren't using IIS 8.

 

RIght-click on your image file, select Properties, and read the file name.

Share this post


Link to post
Share on other sites
st.chalz    0

ok, "DAVEJ" . this is the information i have on my image file.

 

Name: photo0537_001

Type of File: jpg file (.jpg)

Opens with: photos

Location : C:/Users/charles/Pictures

Size : 53.0kb

 

from the above information have been using the "Name" as my (src) then" Type of File " as my (alt ) but yet no visible picture.all i c is a broken link till this point in time.

Share this post


Link to post
Share on other sites
Ingolme    798

Put the HTML file and the image file in the exact same folder right next to each other.

 

Make sure that you know what the extension of the image is. ".jpg" is different than ".JPG", you must use the one that the image file has. Windows often has file extensions hidden by default, you can change that in the folder options.

Share this post


Link to post
Share on other sites
davej    244

 

Location : C:/Users/charles/Pictures

 

Why doesn't it say C:/Users/charles/Desktop/Newfolder_web

 

???

Share this post


Link to post
Share on other sites
st.chalz    0

Goodday, "INGOLME" i actually did what u said by checking the extension file as to be sure and also the inclusion of the image file in html folder but yet no positve result yet..

Share this post


Link to post
Share on other sites
st.chalz    0

Goodday, "DAVEJ" it was when i brought the image file to the newfolderweb that was when it included the newfolderweb extension to the location directory of the image file.

Share this post


Link to post
Share on other sites
dsonesuk    712

Try this just to check image works in browser and get absolute path.

 

1) right click image in question and chose 'open with'

2 ) this should show a browser (firefox, explore etc) as option, if not select 'choose default program'

3) uncheck 'Always use the selected program to open this kind of file' and browse for internet browser.

4) once selected click 'ok' and this should open the image in selected browser.

 

6) replace src of img tag with this, it should show, if it does, you know it works, and change it to relative path.

7) if not! your html file is incorrect, or it is not saved correctly with correct Encoding (if you use Notepad ++ (google and download) it will save it correctly by default, you don't have to worry about saving with correct encoding like you do using windows notepad.

Share this post


Link to post
Share on other sites
johnniewalk    0

Actually i think after writing a code for image file you have to upload it in a tools like dream viewer or something in that, according to your theme there is a path to upload your images in that path you have to upload your images..

Share this post


Link to post
Share on other sites
davej    244

Actually i think after writing a code for image file you have to upload it in a tools like dream viewer or something in that, according to your theme there is a path to upload your images in that path you have to upload your images..

No, he's taking about using local files on his own computer.

 

If you create a folder on your desktop and you put the image file and the html file in that same folder then it should find the image.

 

If you want to actually use IIS then you can't put the folder on your desktop. You will need to find and use your inetpub\wwwroot folder.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×