|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I use PERL to generate an html page thanking my customers for ordering. I want my banner logo to appear on this page, and use what I think in the correct PERL code to display my banner. Basically, I'm using "print" statements to generate the html so I don't see why my image won't display. It shows up as a broken image link like the kind you see on sites that don't maintain their pages very well. My guess is that when the page gets loaded in the browser the image somehow doesn't get loaded.
Am I doing something wrong? If I want to display mybanner.gif in an html document, what would be a snippet of code that would get it to work (And yes, I'm certain that the image file exists and is in the appropriate directory path for display.)? |
|
#2
|
|||
|
|||
|
Before trying to build the page dynamically, build a static "dummy" of the output you want. Then snip out the image link and put it into your Perl print statement.
![]() |
|
#3
|
|||
|
|||
|
My PERL code is based on a static HTML page that I already use on my home page, so I know it works. I don't get any errors when I run the script at the command line, yet my results are not what I would expect. Guess I'll keep plugging away.
|
|
#4
|
|||
|
|||
|
When your script sends up the dud page, do View Source in your browser to see what you're getting.
One thing to watch out for is quotation marks. I usually use single quotes within code that will be used in a print statement: print "<img src='http://www.foobar.not/pic.gif' alt='Banner'>"; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Gettings images to load in an HTML page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|