Solved

Anchor links is not working in lotus html mails

Posted on 2004-04-02
14
379 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

861 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