Anchor links is not working in lotus html mails

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
LVL 14
p_parthaAsked:
Who is Participating?
 
Sjef BosmanGroupware ConsultantCommented:
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
 
Sjef BosmanGroupware ConsultantCommented:
Bro, you have passthru html on?
0
 
p_parthaAuthor Commented:
i wrote the code using html email from nblade

Partha
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
p_parthaAuthor Commented:
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
 
Sjef BosmanGroupware ConsultantCommented:
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
 
p_parthaAuthor Commented:
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
 
Sjef BosmanGroupware ConsultantCommented:
Try to write the html in an htm-file, then open that, what happens?
0
 
Sjef BosmanGroupware ConsultantCommented:
Gotcha! You mean in Notes client, not in browser? Did you check Help-db on anchor?
0
 
p_parthaAuthor Commented:
simply put, i need a table of contents model working in notes client email...is it possible?

Partha
0
 
Bozzie4IT ArchitectCommented:
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
 
p_parthaAuthor Commented:
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
 
Bozzie4IT ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.