alix
Junior Member
Posts: 57
|
Post by alix on Jan 18, 2008 1:27:45 GMT -5
Hello to all RBers !
Is there a way of displaying in image located in the root directory (C:rbn) with the html command ? I have tried :
html "<img src='file:///C:/rbp/mandelbrot.jpg' img style='width: 100px; height: 76px;'>" html "<img src='mandelbrot.jpg' img style='width: 100px; height: 76px;'>"
but it does not work. I'd like to display a reduced version of the image and this would be one way of doing it ....
|
|
|
Post by StefanPendl on Jan 18, 2008 2:14:15 GMT -5
Any file that should be used with the HTML command must be placed in the public folder or a subfolder of the public folder.
html "<img src='http://localhost:8008/spacebackground1.JPG' img style='width: 100px; height: 76px;'>"
|
|
alix
Junior Member
Posts: 57
|
Post by alix on Jan 18, 2008 2:54:35 GMT -5
ok, thanks
|
|
alix
Junior Member
Posts: 57
|
Post by alix on Jan 18, 2008 4:30:57 GMT -5
And here the code to list all the JPG files in a directory and display them in a reduced size.
' ' get JPG files and display '
files #g, DefaultDir$ + "\Public\uploads\*.jpg"
if #g HASANSWER() then count = #g rowcount() for i = 1 to count if #g hasanswer() then 'retrieve info for next file #g nextfile$() print 'print name of file img$=#g NAME$() print img$ url$ = "http://localhost:8008/uploads/" html "<img src="""+url$+img$+""" img style='width: 200px; height: 150px;'> <br>" end if next end if wait
|
|