embedding images in webspeed

rcgomez11

Member
hello progresstalkers, i need help about embedding images inside my html files compiled in webspeed procedure window....i cant see my images when i use the <img src="" />, binding it with <body> as <body background=""> and even placing it with css or js file??how can i set an image inside my html file?anyone help will be appreciated...thanx in advance...sorry if i have a lot of question,im just starting in webspeed, thats why....
 

gean melo

New Member
Hi this few tips for you to add images in html page .

1 - using the tag img
ex: <img src="path of the image" width="28" height="21" alt="a mensage" >

2 - using the property background of tag body
<body background="image URL">

3 - using css to add an image as background
<style type="text/css">
<!--
body { background-image: url("/images/css.gif");}
background-repeat: repeat-y/repeat-x/no-repeat;
background-position: 200px 70px;
background-attachment: scroll;
-->
</style>

# there are more attributes to set the image as a background css
I recommend you read something about css, HTML 4.0 and xhtml.

# and do not forget the image directory has to be added in propath.
 

rcgomez11

Member
gean melo, actually i tried all those things in my webspeed editor..but no one was successfull to place an image inside my working site...i tried placing my code in css, body background and even using img tags..theres no error prompting me up but the only mistake is, the image wont show..however thanks for your time answering my question..but if you figure how to do it, can you please message me again...thanks alot..
 

gean melo

New Member
maybe the issue
is with the extension of the image
always use image with extension .jpg , .jpeg, .gif, .PNG .

maybe be the issue .
 

rcgomez11

Member
i use .gif, .png, and .jpg...have you tried to place an image using webspeed procedure editor?if you have, can you send me some example of a working code that can place an image in my html file...
 

rcgomez11

Member
These are the ways that i tried but on one was successfull to show my image:
Using css:
<style type="text/css">
body {
background: url('images/bckg.gif');//even if use backgroun-image,it doesnt work but when i change the value part of background into just colors,instead or url('path'), it works..
}
</style>

Inside html:
<html>
<head>
<title> Image </title>
</head>
<body background="images/bckg.gif">
</body>
</html>

Please examin my codes if i missed something..im working with my layout now and i cant start pasting images because of that..thanks again gean melo...have a great day..
 

Fuzzmaster

New Member
Not sure you can embed images like you can html; instead the dynamically generated html references the location of the static content. Static content like the "images" directory should NOT be in your working directory; it should be off the web root and therefore available to be served.

IIS example:

IF DIR = C:\inetpub\www\images
THEN CSS = {background-image: url('/images/somepic.jpg');}
THEN HTM = <IMG SRC="/images/somepic.jpg" />

Apache example:

IF DIR = /var/www/images
THEN CSS = {background-image: url('/images/somepic.jpg');}
THEN HTM =<IMG SRC="/images/somepic.jpg" />

You may also want to check for upper/lower case issues, spaces, or symbols in the path as these can be problematic as well. The easiest way to check a url is to test the absolute path in your browser, something like:

"http://localhost/images/somepic.jpg"
"http://[host]/images/somepic.jpg"

If you see it using the absolute address, you should be able to drop the method://host and still know you're green.

On the other Hand:

If you really wanted to embed those images I suppose you could (given support by your version of progress 10.1a+) store and retrieve them as Binary or BLOB's.
 

rcgomez11

Member
ei Fuzzmaster, tanx for the reply, i really need this stuff..but do i have to include those codes and where do i have to place them?or your just making your commands to me in a programming style(the if then statement),do i have to includes those codes and where should i place them,inside my httpd.conf file,where all the configuration about apache is being processed..im using apache 2.2 and progress openedge 10.1b in windows xp sp2..again tanx for the reply...just wanna know if where to include those codes...
 

rcgomez11

Member
tanx for all your replies folks....i got the answer, i just forgot to put a "/" before my dir name...but definitely accept my tanx for all of you man...hope you still have time for all of my queries....have a nice day...
 
Top