Link to home
Start Free TrialLog in
Avatar of aegressy
aegressy

asked on

"Customizing" links in a RichText field

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
Avatar of martijnmulder
martijnmulder
Flag of Honduras image

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.
Avatar of CRAK
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...

That last option may prove important when creating new documents....
Avatar of aegressy
aegressy

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 :-(
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....)
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
aegressy,

I don't mind.... it was your question and now you're the judge!
Is it possible to split points? Never tried it....
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
You're welcome!
Thanks for the 4 x 200 pt!