Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 7th, 2001, 06:48 PM
tbonds tbonds is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 21 tbonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 57 m 9 sec
Reputation Power: 0
Question Gettings images to load in an HTML page

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

Reply With Quote
  #2  
Old July 8th, 2001, 07:06 AM
Pressly Pressly is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 48 Pressly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Lightbulb Do a Static Test

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.

Reply With Quote
  #3  
Old July 8th, 2001, 07:37 AM
tbonds tbonds is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 21 tbonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 57 m 9 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old July 8th, 2001, 10:13 AM
Pressly Pressly is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 48 Pressly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Post View Source

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'>";

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Gettings images to load in an HTML page


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT