Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

OT: Firefox image display

by Anonymous Monk
on Jun 14, 2005 at 08:20 UTC ( #466423=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
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.

      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.

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.
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'?

    CU
    Robartes-

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
    meh.
Re: OT: Firefox image display
by dorward (Curate) on Jun 19, 2005 at 12:06 UTC
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
Re: OT: Firefox image display
by Anonymous Monk on Jun 19, 2005 at 11:04 UTC
    I am still having problems with this issue. When using the following code it again works in iexplore, but not firefox.

    <img src="C:/Taieri Print Ltd/Mailbird/images/tp-logo.gif" border="0">


    It displays the no image icon
      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!).

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://466423]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2022-09-28 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (124 votes). Check out past polls.

    Notices?