Hi every body I am generating HTML via
java having just a bit of trouble with url construction so i am typically using
data.writeTofile("<h2><font color = blue>is a stock picture</font></h2>"); which works just fine together with the rest of the code to make the webpage
now i have a working url which pulls in a picture of a book, to be accurate its a picture of a blank to indicate that a picture is not available you can view this by pasting this
http://www.communicatingwithpictures.talktalk.net//Cimages/no-image.gif in to the address bar or this code in an html document
data.writeTofile("          <img name='theBook'src='
http://www.communicatingwithpictures.talktalk.net//Cimages/no-image.gif' width='167' height='280'/>");
now what i am trying to do is replace the last part with a variable so that i can select different books to display at the moment the are a few books on this webspace an example of which is The Arabian Nights) Childrens Classics so changing no-image.gif for 9781858137162.jpg works fine
If however i substitute no-image.gif for a variable lets call it the lastbit and try to construct the url then it does not work can anyone tell me why or tell me how to solve the problem
so just to be clear
data.writeTofile("<h2><font color = blue>is a stock picture</font></h2>"); i use this type of arrangement to generate the html
data.writeTofile("          <img name='theBook'src='
http://www.communicatingwithpictures.talktalk.net//Cimages/no-image.gif' width='167' height='280'/>");
works fine
String lastbit ="no-image.gif"; this is so i can change to say lastbit ="9781858137162.jpg";
does not work why?
data.writeTofile("          <img name='theBook'src='
http://www.communicatingwithpictures.talktalk.net//Cimages/lastbit' width='167' height='280'/>");
if i change no-image.gif to 9781858137162.jpg manually it does work