Solved

Anchor links is not working in lotus html mails

Posted on 2004-04-02
14
349 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

13 Experts available now in Live!

Get 1:1 Help Now