Solved

"Customizing" links in a RichText field

Posted on 2001-06-11
11
283 Views
Last Modified: 2013-12-18
Dear friends,

  I am working on a lotus notes database, that is hosted on a Lotus Domino server and presented on the Internet.
  The documents in this db contains RichText fields - that are the bodies of the Web pages. I am using different (!!) forms for editing these forms in Notes client and for displaying them on the Web.

  Now, what is the problem:

  When creating links in the RichText fields (by selecting a document, Edit->Copy as link to a document), they open the documents in the original forms (treated for use in the client program ONLY.)

  The links generated by domino are the following:
    http://domain/db/unique_id_of_DEFAULT_view/unique_id_of_doc.
  Due to this the documents are opened in the mentioned form.

  What can I do to ensure that the documents should be openned in a form treated for the Web (they are stored in a text-field, called 'FormToOpen') ??

  Thanks

aegressy

--------------
Note: I tried to realise it attaching a small JavaScript to the OnLoad event on the Web page, which changed the unique id of the original view to another view, where I changed the formula for the form name, that should be the documents open in). However this is not the right way because during the whole page loads (including all the pictures), user can click to a link and get to a page that shouldn't appear on the Web
0
Comment
Question by:aegressy
  • 6
  • 4
11 Comments
 
LVL 4

Expert Comment

by:martijnmulder
ID: 6180442
well if you use R5 it's easy you create 2 forms with the same name and in the design properties of the form you hide one for web users and one for notes users.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6181520
Have you tried the views form formula (R4: in the property box, R5: one of the events)? Add it to that default view that you use to open the document.
Based on @ClientType="Web" or "Notes", or @Userroles="$$WebClient" you can tell it what form to use for opening. You may have to check @IsNewDoc to, and direct it to e.g. @Unavailable...

0
 
LVL 13

Expert Comment

by:CRAK
ID: 6181523
That last option may prove important when creating new documents....
0
 

Author Comment

by:aegressy
ID: 6212123
Martijnmulder,
  Your solution in Your answer is quite easy but very useful! I never tried this :-(

CRAK,
  I'm not using Notes for a long time - maybe that is the reason -; i didn't find the views form formula anywhere, could you please tell me, where can I find these events??


Sorry for the late answer!!

Regards
aegressy

PS: I both of the proposed solutions will work, I think the best will be to spread the points to both of you; do you agree?
0
 
LVL 13

Accepted Solution

by:
CRAK earned 200 total points
ID: 6213606
In R4.x:
Open the view in design-mode, open the property-box (Alt+Enter or 1st smarticon), select 4th tab (yellow/red propellor hat) and press the button "Formula window".

In R5:
Open the view in design-mode, and select "Form Formula" in the events list in the lower half of your screen.


Enter something like:

@If(
  @IsNewDoc;
    @Unavailable;
  @Contains(@Userroles; $$WebClient");
    "myWebForm";
    "myNotesForm")


I used to add 2 fields to each form: if a form was called nfABC (nf for NotesForm) that would be:
NotesForm = nfABC (identical to Form), and
WebForm = wfABC (wf = WebForm).
Naturally, in the webforms, Form would equeal WebForm...

Instead of "my....Form" in that formula, I would refer to these two fields!


Spread/divide the points (how?), assign 200 to either or both.... or increase points first.... I don't mind! It's up to you: you're the judge in this question!
May I suggest grade "A"?  ;-))
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:aegressy
ID: 6237249
Well, CRAK, I think you've a little missunderstood my problem (maybe it's my fault :-)

Openning documents through their links from a view on the Web I've solved the same way, you mentioned (the Web form was called FormToUse, but it is unimportant). I also used the 'Form formula' in the corresponding View.

The documents from the view are openned correctly, in the form assigned to use on the Web, BUT: the links inside of a richtext (contained by this document) refers to documents through the forms they was created in.
(I mean the links inside of a displayed document, not in a view.)

Regards
aegressy

PS: Sorry for the late answer :-(
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6238063
It SHOULD work! I used to do just that!

You've created a doclink in a document's richtext field to another document, accessed through a notes view.
If that same document (with doclink) is opened through the web, the browser follows the link through the original (notes) view to reach the linked document.
Although the view is not opened, the document is opened through it and the views form formula still determines how to open it (what form to use). In other words: that (notes) views form formula should tell -depending on the client- what form to use.

100% sure!

Would you like me to e-mail a demo? (might not be able to  over the week-end....)
0
 

Author Comment

by:aegressy
ID: 6244178
CRAK,

your solution really works correctly, I just had to create the old links again to refresh them (I thought that they are generated dynamically when the page is open, but the opposite is truth).

We can now close the question, considering the difficulty of your comment I suggest to spread the points to 150 for Crak and 50 for Martijnmulder, ok??

aegressy
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6248119
aegressy,

I don't mind.... it was your question and now you're the judge!
Is it possible to split points? Never tried it....
0
 

Author Comment

by:aegressy
ID: 6263079
Thanks for the advise, CRAK.

Martijnmulder, I've created a question with the promissed 50 pts for You, please propose an answer for the points...

Regards
aegressy
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6263868
You're welcome!
Thanks for the 4 x 200 pt!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now