Solved

Anchor links is not working in lotus html mails

Posted on 2004-04-02
14
359 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

22 Experts available now in Live!

Get 1:1 Help Now