Solved

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

Posted on 2004-10-12
14
408 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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