Solved

Anchor links is not working in lotus html mails

Posted on 2004-04-02
14
397 Views
Last Modified: 2013-12-18
Hi guys
Is there any way to make the anchor links to work in html emails, It doesn't seem to work.. for ex: this simple html will not work if it is in notes email
<html>
<body>

<p>
<a href="#C4">
See also Chapter 4.
</a>
</p>

<p>
<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<a name="C4"><h2>Chapter 4</h2></a>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 13</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 14</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 15</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 16</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 17</h2>
<p>This chapter explains ba bla bla</p>

</body>
</html>

any quick alternative suggestion will be much appreicated

Partha
0
Comment
Question by:p_partha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
14 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10743461
Bro, you have passthru html on?
0
 
LVL 14

Author Comment

by:p_partha
ID: 10743464
i wrote the code using html email from nblade

Partha
0
 
LVL 14

Author Comment

by:p_partha
ID: 10743484
something liek this bro:

Dim s As New notessession
      Dim db As notesdatabase
      Dim doc As notesdocument
      Dim html As String
      Dim itemname As String
      Dim memPtr As Long
      Dim memPtr1 As Long
      Dim memLen As Long
      Dim memLen1 As Long
      Dim memhandle As Long
      Dim memhandle1 As Long
      
      Dim rc As Integer
      Dim rc1 As Integer
      
      Set db = s.currentdatabase
      Set doc = db.createdocument
      doc.form = "Memo"
      doc.sendto = "<my email id>"
      itemname = "Body"
      Dim itemname1 As String
      itemname1 = "subject"
      
      html = |<html>
<body>

<p>
<a href="#" onclick="javascript:alert('testing');document.getElementById('partha').style.display='none'">
See also Chapter 4.
</a>
</p>
<div id='partha' style='display:block'>

<p>
<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>
</div>
<a name="C4"><h2>Chapter 4</h2></a>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 13</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 14</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 15</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 16</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 17</h2>
<p>This chapter explains ba bla bla</p>

</body>
</html>|
      subject = "this is just a test subject"
      memLen1 = Len(subject)
      rc1 = OSMemAlloc( 0, memLen1, memHandle1)
      memPtr1 = OSLockObject(memHandle1)
      
      Poke memPtr1,subject, memLen1
      rc1 = NSFItemAppend(doc.handle,ITEM_SIGN,itemname1,Len(itemname1),1280,memPtr1,memLen1)
      memLen = Len(html)
      
      
      rc = OSMemAlloc( 0, memLen, memHandle)
      memPtr = OSLockObject(memHandle)          
      
      Poke memPtr, html, memLen
      rc = NSFItemAppend( doc.handle, ITEM_SIGN , itemname, Len(itemname), TYPE_HTML, memPtr, memLen)
      
      OSUnlockObject memHandle
      OSMemFree memHandle
      
      
      
      
      
      
      
      
      
      Call doc.Save(True, False)
      
      
      Call doc.send(False)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10743603
Who taught you to write such ugly words? Yuck! This kind of code hurts my eyes, but maybe it's the only way to do this. Why not define a richtext-field Body, and set PassThruHTML in a NotesRichTextStyle?

Anyway. Do you have the resulting HTML, so we can see what's missing??
0
 
LVL 14

Author Comment

by:p_partha
ID: 10743618
bro,
it was just a sample code, i wrote to explain u ;-)

but the resulting html is same as what i pasted it in the beginning, if i paste that html in a html kit and see it in explorer, the anchor tag works


:-(

Partha

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10743665
Try to write the html in an htm-file, then open that, what happens?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 10743715
Gotcha! You mean in Notes client, not in browser? Did you check Help-db on anchor?
0
 
LVL 14

Author Comment

by:p_partha
ID: 10743952
simply put, i need a table of contents model working in notes client email...is it possible?

Partha
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 10743961
Look on www.searchdomino.com, they just had an article (or a tip) on doing html mails last week.

Another possiblity is to use the web.nsf on the server (using getdocumentbyurl method) to get a decent html rendering.

cheers,

Tom
0
 
LVL 14

Author Comment

by:p_partha
ID: 10744043
Tom
thx for the post, but most of them speak abt html emails not anchoring the links...

i was thinking logically it doesn't sound possible to have some code executed at the notes lcient level,..

MY bro sjef, do u second me on this?

Partha
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 125 total points
ID: 10744107
Only with an embedded form and a lot of functionality in that. Hidden fields and copying them to a visible field. Not the nicest solution, but it will keep you from the street for a while ;)
0
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 125 total points
ID: 10744202
Ah, I think you can add your links (as html links) to a Notes document , render it using the Domino server, use getdocumentbyurl to access it, and then you should have working anchors.

That should work, the problem is that, if you don't do it like this, Notes adds a whole lot of nonsense in front of the anchor, rendering it unuseable.

Tom
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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