Solved

Create Domino button to open URL and add page to "Favorites"

Posted on 2004-10-12
14
406 Views
Last Modified: 2013-12-18
I would like to create a button that, when the user clicks on it, will open IE, take them to the appropriate URL and then add this URL to their "Favorites" in IE. Is this possible? Thanks.
0
Comment
Question by:jsquek
  • 5
  • 4
  • 4
  • +1
14 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 12294104
@urlopen("javascript:window.external.AddFavorite('http://www.google.com','google')")

Partha
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12294117
or just give this in button after changing it to javascript:

window.external.AddFavorite('http://www.google.com','google')

Partha
0
 

Author Comment

by:jsquek
ID: 12294520
I added the urlopen code to a button and got the following error: A JavaScript was encountered. Error: windows.external has no properties. Forgive me but I am a newbie developer. Thanks.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 14

Expert Comment

by:p_partha
ID: 12298040
did u try my second post ... it's just javascript

Partha
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12298225
>> take them to the appropriate URL

window.open (URL, WinName, WinOptions)

>> and then add this URL to their "Favorites" in IE. Is this possible?

Yes, it is possible. However, it doesn't happen automatically. It prompts the user whether he/she wants to allow teh site to add a bookmark to their favorite. The code Partha already gave above. It works. See this page: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/addfavorite.asp
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12298239
Be sure about the capitalization. A and F in AddFavorite must be in upper case.
0
 

Author Comment

by:jsquek
ID: 12299604
Partha and Ranjeet,

I tried this code in a Domino hotspot button:

window.open ('www.google.com')
window.external.AddFavorite('http://www.google.com','Test - google')

and got the following error message: Error: ToObjectError: window.external has no properties.

I copied and pasted both lines of code from your comments. Any ideas? Thanks a bunch
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12299624
what is ur IE version?

Partha
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12300020
Are you opening the URLs from IE? Or are you using Notes' built-in browser? I am not sure whther Notes' built in browser supports external object.
0
 

Author Comment

by:jsquek
ID: 12300173
My IE is version 6.0.2800.1106. Operating platform is XP SP1. Do you happen to know if similar code exists in LotusScript? Thanks.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12300333
The @UrlOpen does nto work, because it always assumes that there should be a :// protocol -- http:// or ftp:// -- and adds it if not present.  A URL link might work, or hand-coded Javascript or HTML.
0
 

Author Comment

by:jsquek
ID: 12300475
On my last post with the code I used ..., I had selected Javascript

I tried this code in a Domino hotspot button:

window.open ('www.google.com')
window.external.AddFavorite('http://www.google.com','Test - google')

and got the following error message: A JavaScript was encountered. Error: ToObjectError: window.external has no properties.

I copied and pasted both lines of code from your comments. Any ideas? Thanks a bunch
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 200 total points
ID: 12300757
Sure! Try this:

      Dim retVal As Integer
      retVal = Shell("explorer http://www.google.com", 1)
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12300825
Forgot the part two :)


      ' Part 1
      Dim retVal As Integer
      retVal = Shell("explorer http://www.google.com", 1)

      ' Part 2
      Dim IEObj As Variant
      Set  IEObj =  createobject("Shell.UIHelper.1")
      IEObj.AddFavorite "http://www.google.com","Google"


0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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