Re: OT: Firefox image display
by dorward (Curate) on Jun 14, 2005 at 08:48 UTC
|
This doesn't sound like a Perl issue, since the problem is with the URL format you are using (it might have been a Perl issue if you were using HTTP URLs, but there isn't any chance of that when reading from the filesystem.)
Note: I'm assuming that you copy/pasted the example image tag from the outputted source, or that it is being output as you expected. If not, you should check to make sure the Perl script is outputting what you think it should be.
The mozilla.org site includes file scheme test cases which should show you what formats Mozilla based browsers can cope with. Note that literal spaces are not allowed in URLs, and must be represented as %20.
The simplist solution to this issue is to forget about file scheme URLs and just access the images over HTTP. You'll have to do this if you want to publish the pages on the web anyway.
| [reply] |
|
The mozilla.org site includes file scheme test cases which should show you what formats Mozilla based browsers can cope with. Note that literal spaces are not allowed in URLs, and must be represented as %20.
I couldn't find such a reference. Where on that page does it say that spaces aren't allowed in URLs? Any modern browser handles spaces in URLs gracefully. After all, remember the original reason for encoding spaces:
The space character is unsafe because significant spaces may disappear and insignificant spaces may be introduced when URLs are transcribed or typeset or subjected to the treatment of word-processing programs.
I don't think that's a significant enough reason to forbid spaces in entered URLs (which can be replaced by %20 in the location bar and page properties, etc. later) compared to the benefits. And indeed I've never had a problem in any Mozilla-based browser involving spaces.
| [reply] [d/l] [select] |
Re: OT: Firefox image display
by Anonymous Monk on Jun 14, 2005 at 14:59 UTC
|
Opera by default blocks access to file:// URIs from within documents that are served from the Web for security reasons. | [reply] |
Re: OT: Firefox image display
by robartes (Priest) on Jun 14, 2005 at 08:38 UTC
|
I think you'll have to give us some more information -- what is displayed in Firefox when you run this script? What is shown in 'View Source'?
| [reply] |
Re: OT: Firefox image display
by stonecolddevin (Parson) on Jun 14, 2005 at 08:52 UTC
|
Try using <img src="C:/taieri Print Ltd/Mailbird/paperclip.jpg" border="0">, the file:/// portion is probably throwing things off
| [reply] |
Re: OT: Firefox image display
by dorward (Curate) on Jun 19, 2005 at 12:06 UTC
|
| [reply] |
Re: OT: Firefox image display
by Anonymous Monk on Jun 19, 2005 at 11:04 UTC
|
| [reply] |
|
Well, for one, you have an illegal URL. Filepaths are not URLs. URLs can't have spaces in them. For a local file, the URL is something like "file:///path/to/the/file". IE is probably correcting the error for you (bad IE!), but FIreFox is following the specification (good firefox!).
| [reply] |
Re: OT: Firefox image display
by Anonymous Monk on Jun 19, 2005 at 13:40 UTC
|
I am sorry to trouble you again about this topic, but I am still unable to resolove.I try the following code
print $query->image_button(-name=>'button_name', -src=>'http://localhost/cgi-bin/Sunset.jpg',
-align=>'MIDDLE');
Perhaps there is something i am not understanding. This is a webpage that will be access on an Intranet on the local machine running apache. | [reply] |
|
| [reply] |
Re: OT: Firefox image display
by Anonymous Monk on Jun 19, 2005 at 14:00 UTC
|
I was able to get it working. Had to make change in httpd.conf to set to DocumentRoot "C:/Program Files/Apache Group/" then subsequent images src to http://localhost/apache/cgi-bin/images etc | [reply] |