PDA

View Full Version : Correct html code for loading JPEGs


orbman
04-25-2003, 02:05 PM
Sorry for this second thread, but I had two questions in a previous thread, and the thread title really didn't address the remaining unanswered question.

I have written my own off-line, html code to load text and images on my PC, and want to do the same on my NX-60. All of the html files and JPEGS have been copied to a memory stick.

Does anyone know what the html code should look like for loading a JPEG image into NetFront 3.0 from the memory stick?

If I store the images in Palm/images/, but not in any sub-directories, NetFront 3.0 will load them if I choose a JPEG under "saved file," but I can't seem to load them from any other folder or sub-directory on the memory stick, nor can I find the right

<"img src=/?????/imagename.jpg>

html code to get NetFront to load an image from my html file. NetFtront will load the text but not the JPEGs as part of the html file.

Any ideas?

Thanks.

CelticBlue
04-25-2003, 03:16 PM
If the jpegs are in the same directory as the HTML file you can use "./image.jpg". Or you can use a relative path.

/foo/bar/mypage.html

references an image in

/foo/images/pic.jpg

as

"../images/pic.jpg"

I haven't actually tried this with NetFront but I would certainly expect it to work.

NXTacy
04-25-2003, 03:19 PM
When netfront saves to the MS it is not html but compressed mht archives. Don't know if that makes a difference.

CelticBlue
04-25-2003, 04:28 PM
And apparently that pathetic excuse for a web browser can't open HTML files that are stored anywhere but in the MSWEB directory. Sheesh. What shoddy programming.

Anyway if you have an HTML page in the MSWEB directory on your memory stick and it uses relative paths to images on your MS it does load and display them.

fjs
04-25-2003, 06:36 PM
If I load an HTML Page from the MS, NetFront will only show me the first image.
Knows anyone this problem ?

CelticBlue
04-25-2003, 06:48 PM
I would guess that you don't have the images on your MS or that the page you are viewing has bad paths to the images.

It does load multiple images just fine from MS on my NX.

orbman
04-26-2003, 09:16 AM
Hi,

The following worked:

<img src = "file:///"memory stick name"/..../..../imagename.jpg>

Html files must be in /Palm/Programs/MSWEB for NetFront 3.0 to find them, but the images can be anywhere on the memory stick as long as the images source html code is written as shown above. I hadn't realized that the name of the memory stick was required.

Thanks for all the suggestions.

Sorry for the cross-posting on my other thread.