I have just created my first web form using pass-thru html and all looks fine and well when I first create a document on the web using this form. The form saves/submits okay without any errors or problems.
The problem is however, when I re-open the document on the web, the formatting is awlful. My javascript menus are not displayed, neither is any of my formatting.
I have two forms of the same name, one for Notes and one for the Web. If I view the document in Notes that I created on the web it looks as expected in the client, but not if I view it on the web.
I know this is probably a ‘how long is a piece of string’ type question, but can anyone offer any thoughts as to what I have overlooked that could be causing this problem.
Many thanks
Subject: Web form not displaying correctly after saving
CSS?
Subject: RE: Web form not displaying correctly after saving
Oops - should have mentioned that one… the form does use CSS.
If that is the problem, I do not understand why it would correctly use the style sheet when creating a document, but not for viewing - only obvious difference I can think is that one is editable and the other is read only.
Would that make a differece?
Subject: RE: Web form not displaying correctly after saving
email me the database if u want… i could look it up for u.
shoktong@yahoo.com
Subject: Web form not displaying correctly after saving
The problem is very likely the good ol’ relative URL issue. A Form and a document created with that form appear to be at different directory levels, so simple relative URLs will not work for images, JS files, style sheets and so on. Your URLs should be relative to the server root:
![]()
… where is some computed text (Create->Computed Text) with the formula:
“/” + @WebDbName
Subject: RE: Web form not displaying correctly after saving
What can I say. Perfect Stan. Big Big Thank You!!
Having updated my links to my css and .js files with the @WebDbName computedtext, as if by magic, everything fell into place and once again looked as it should. 
Many many thanks to all for the quick and helpful responses (especially Stan). You guys have helped me on numerous occasions in the past and continue to do so. Thanks again for helping and for your time on this forum.
Subject: Web form not displaying correctly after saving
When you are creating the document, the form opens in edit mode. The form has a tag that is named and has an action, and all fields are converted to HTML tags.
After saving, my guess is that you are reopening the document in read mode, in which case the form tag has no name/action and computed fields (which you are probably using to determine variables used in your JS) are passed thru as strings (if at all).
If there are ever variables that I need to use in JS on a form that is used to create a document, I usually create them using pass thru hidden input fields with the value set with a ComputedValue instead of using Computed For Display fields.
Welcome to the wonderful world of Domino Web programming!
Subject: RE: Web form not displaying correctly after saving
Thanks greatly for the quick responses. Very appreciated.
The form I am playing with is a holiday request form, so there are only a couple of editable fields on the form, the rest is static text/information. All fields are displaying the correct values both in read/edit mode. 90% of the field information is being sourced from computed for display fields where therir source are hidden fields. I will try updating these to be fields.
I have been back to view the source of both and can see what you are referring to regarding the <form action… tag.
On the editable form I have…
<input type=“hidden” name=“__Click” value="0>
when viewing the saved document I have…
Do you think it is this that is causing my formatting problem?
Rather than let Domino generate these references should I code them on the form?
Many thanks.
Subject: RE: Web form not displaying correctly after saving
If your javascript is relying on document.forms[‘formName’] instead of document.forms[0] then this could be the problem. But my guess is it is the 90% computed for display fields, which can be problematic in read mode. See if/where they are in the source in read mode. Creating passthru hidden input fields yourself instead of computed for display fields should fix the problem.
Coding the whole thing as passthru (i.e., treating the form as HTML and coding the whole thing yourself) should really not be necessary.