Solved

image won't display in iframe

Posted on 2010-11-13
4
447 Views
Last Modified: 2012-05-10
Please see http://www.livingthreadstextileartists.com/dev/textile-artists-test2.html and try clicking on Jean Allton or Pam Curtis. The birdcage should change to a different image but doesnt. Unstead I get an error message saying:

The requested URL /devhttp://www.livingthreadstextileartists.com/dev/images/artists-images/jeanallton.jpg was not found on this server.

However, the image is on the server. For some reason that I do not understand, /dev has been added to the start of the URL which is why it can't be found. Can anyone tell me why and suggest a fix?
0
Comment
Question by:mattybrown
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34129416
Because you put it there in the javascript....  Try removing the '/dev from the end of that string.
var url = 'http://www.livingthreadstextileartists.com/dev' + imageLocation;

Open in new window

0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34129419
You cannot have a subfolder like 'dev/'  BEFORE an HTTP designation -- it is an INVALID PATH.

Change your HTML code to access the file locally (it the webpage is local to your own server) os that the path reads ONLY THIS --
dev/images/artists-images/jeanallton.jpg

If you don't know how to change that path, open the HTML file with notepad and search for the JPG name, and edit the path to what I have above, save the file and re- upload it.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 34129437
Never mind what I said above.  When I looked at the headers, I realized that 'imageLocation' is a complete URL so all you need is this:
var url = imageLocation;

Open in new window

0
 

Author Closing Comment

by:mattybrown
ID: 34130079
Thank you. Works perfectly now.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
need help with share buttons 11 69
arrays and radio buttons 10 39
Put POST values into cookies. 14 34
Put javascript to get dropdown value 3 22
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question