?
Solved

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

Posted on 2004-10-12
14
Medium Priority
?
422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
  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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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