Solved

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

Posted on 2004-10-12
14
401 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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…

757 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

17 Experts available now in Live!

Get 1:1 Help Now