Dear All
I am applying a CSS in a Notes Computed Text Fields, which “Allow multiple Value” is checked and each value is seprated with New line.
I used this fields in a column.
Now if I select the whole column with field and check “Pass thru HTML” that time CSS is applying on the field but all values of the field is not seprated with new line.
If I remove the “Pass thru HTML” it displayes the values in newlines but CSS is overide.
I saw the view source of the page, it basicall displays the text with in
tags and there is a in side this
. and each value is seprated by
tag.
Can anybody suggests me that how can I achieve the both things (Values are seprated with Newline and CSS).
Thank you.
Regards
Ashish
Subject: CSS is not working on Notes Computed text field
I’m not sure exactly what you are doing. There must be some reason why the CSS isn’t being applied. Domino is it’s own animal and using Domino’s html/css and your own can be a headache at times.
One more certain way to make sure it is applied would be to give the field a class and then have the CSS (specified in the Head) apply values to the class. That has been very reliable for me. Also, you can use JavaScript to manipulate the class style if needed without as much work.
If it simply won’t work for you and you don’t want to use a class, then you’ll have to read the innerHTML of the field and rework the HTML in it using JavaScript after the page is loaded.
Let me know if you need more assist.
Tim Williams
Subject: RE: CSS is not working on Notes Computed text field
The CSS properties in the field properties dialog apply to a field widget. Computed fields are normally displayed as text, not as a field widget. If the field needs to be styled, it needs to be enclosed in a container (div, span or td) that can be identified and styled.
Subject: RE: CSS is not working on Notes Computed text field
Dear Sir,
As you suggested, I have done in the same way. I put the field with in a and applied a CSS using class=“tbl_Data”.
I also used the “tbl_Data” in the field’s class property as well.
but still not working.
below are my code, what I am working exactly.
| |
[and here I have placed the field]
|
this code is placed in a form, when I select the entier code and convert it into HTML, using “Pass thru HTML”, then CSS is applied but the values are not seprated with new line, it shows the values sequencially.
Again I selected only the html code and make it “Pass thru HTML” then the field’s each value is showing in a different line but CSS is not applying.
I saw the page’s view source I found this code.
I think this override my CSS which I used in the .
Am I doing any mistake?
Please suggest me.
Thanks a lot
Regards
Ashish
Subject: RE: CSS is not working on Notes Computed text field
If you set the field to passthru HTML it will follow the same rules as if you had typed the HTML yourself. The values appear on separate lines, but line breaks in an HTML source documents are only interpreted as spaces (and follow the same rule as for any white space in HTML – one space, no matter how much contiguous white space there is in the source). You would need to add a
in the formula for the computed field.
Subject: RE: CSS is not working on Notes Computed text field
Hi Stan,
Thanks for the response.
I need little more help 
This is what I am writing-
@Replace(fldDocumentHistory;“;”;“
”);
What I get is -
Test User1/LRTestDomain has approved the Request /Approver’s Comments: Approved by TU1; Request has been submitted by:Ashish/LRTestDomain;
As you see the semicolon is not replaced with the
.
What is it that I need to do to achieve an output like the following -
Test User1/LRTestDomain has approved the Request /Approver’s Comments: Approved by TU1
Request has been submitted by:Ashish/LRTestDomain
Thanks in advance.
Regards
Ashish
Subject: RE: CSS is not working on Notes Computed text field
What’s with @Replace? You can either use:
fldDocumentHistory + “
”
using a new line as a separator, or
@Implode(fldDocumentHistory; “
”)
Subject: RE: CSS is not working on Notes Computed text field
Also, You can always use @NewLine in a computed text field. I’ve used both a “
” and also @NewLine to parse up a multi-value field. Either one of these will parse the values into HTML for display on multiple lines.
As for the CSS being applied. Are you stating that the CSS did not get applied to the field values? If you have font properties, etc, in the CSS for the class it should have taken effect on those values, whether it’s a single or multiple value field. Whatever is contained in the html container (td, tr, input, etc) with the class will inherit those properties unless specifically told to be different.
Good Luck.
Tim Williams
Subject: RE: CSS is not working on Notes Computed text field
If the field is marked as passthru HTML, @NewLine becomes nothing more than white space in the source and will be rendered as nothing more than a space in the browser.
Subject: RE: CSS is not working on Notes Computed text field
Thank you very much Sir.
I used the @implode as you suggested and now It is working as I expected.
But I have a doubt that why It was not working with @Replace.
Any way Thank you for your support.
Regards
Ashish
Subject: RE: CSS is not working on Notes Computed text field
Because “;” was not a literal member of the list. All the “;” would have been (if it were there at all) is a display separator, so even @ReplaceSubstring would not have worked.