Greetings One And All,
I have an issue whereas I have created a form and on this form, I have HTML code that displays some graphics (gifs) in my header.
Whenever I go to compose/create a document using this form (via the web), the graphics display as expected; however, when I go to view or view the document, typically accessing it through a view, the graphics display as broken images.
As far as the graphics, well I created them using PhotoShop, saved them as gifs, and imported them into my Image Resources.
Again, whenever I create/compose this document, everything displays as expected; its when I go to read the document that I notice the problems.
Regards,
Governor
Subject: R6 & Images Created with HTML
Relative URLs. Forms are database design elements, so their URLS make them look like “files” in the database “folder”
www.mydomain.com/path/database.nsf/FormName?OpenForm
Documents are data notes, and appear to be “in” a “view folder” inside the database “folder”
www.mydomain.com/path/database.nsf/ViewName/DocumentUNID?OpenDocument
You need to create a URL if you want to use relative URLs.
Subject: RE: R6 & Images Created with HTML
Stan,
Thanks for your response, and what you said makes sense; however, I’m somewhat confussed as to having relative URLs to images within my Image Resources (in this instance). Furthermore, why wouldn’t the same happen when simply composing the form?
Again thanks,
Governor
Subject: RE: R6 & Images Created with HTML
When you are composing, you are directly relative to the database. When you look at a document, you are one level lower, below a view.
Subject: RE: R6 & Images Created with HTML
Simple. If you are only using the name of the graphic in your src attributes, it will work perfectly on a Form, since the Form’s URL is
www.domain.com/path/db.nsf/formname?openform
and the image resource (also a design note) is:
www.domain.com/path/db.nsf/image.gif
To the browser, they appear to be “in” the same folder, so using the file name is all that’s required. A document, on the other hand, needs to go up a level, to its apparent “parent folder” to get to the image resource. If it does not go “up one” then the browser actually requests this from the server:
www.domain.com/path/db.nsf/viewname/image.gif
It doesn’t matter what you put in as a URL path, the actual request for a file needs to be the whole big long URL. If you don’t specify something else, the browser uses the filepath of the window’s current location, and just replaces the filename portion. Since the image resource is not “in” the view, you get the famous x-box (not to be confused with a gaming console).
Subject: RE: R6 & Images Created with HTML
Stan, Ben…
Thank you both so much for your responses.
After really reading and understanding your postings, I went and modified my code to include the Relative URL and whatta you know; the images show up.
Again, thanks so much.
G