Web form problems
After creating a document in Notes I want to view it on the web with the web form. The correct form is being used (because each form is hidden from either Notes or Web).
However, on the web version I have some CSS and HTML links (imagename?OpenImageResource). The images are not displaying when I include fields in the web form.
I have tried computed text and different field types but the links remain broken. If I put a default value ("show this") in the field it retains the links and dsiplays the text.
This error is USUALLY due to how the URL for the image or page is being resolved. If your formula is '/myimage?OpenImageResource' then the resolved URL will be '/myimage?OpenImageResource" As you can see, this isn't what you want. Domino will look for this in the 'data/domino/html' directory because there is no .NSF to point it to a database. On the other hand 'myimage? OpenImageResource' may not resolve correctly either. Normally, omitting the forward slash tells Domino to add this string to its current root. So if your document was called from a view the URL might resolve to something like '/myfile.nsf/myview/myimage?OpenImageResource'. Again, not what we want because there is no 'myimage' document in the 'myview' view. Since your document might be called from a view, or directly from the database, or through a search, the best way to handle this is to compute the entire URL. Use this code as the formula for the computed text: db := @ReplaceSubstring(@Subset(@DbName;-1);"";"/"); URL := server + "/" + db + "/myimage?OpenImageResource"; "Make sure that the computed text is marked as Pass Thru HTML and you're all set. If this is still not working, view the source of the HTML document in your browser to see what URL is being passed. You may be able to troubleshoot any problems from there."
Dig Deeper on Domino Resources - Part 6
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our Domino experts
View all Domino questions and answers
Start the conversation
0 comments