jsquek
asked on
Create Domino button to open URL and add page to "Favorites"
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.
or just give this in button after changing it to javascript:
window.external.AddFavorit e('http://www.google.com','google')
Partha
window.external.AddFavorit
Partha
ASKER
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.
did u try my second post ... it's just javascript
Partha
Partha
>> 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
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
Be sure about the capitalization. A and F in AddFavorite must be in upper case.
ASKER
Partha and Ranjeet,
I tried this code in a Domino hotspot button:
window.open ('www.google.com')
window.external.AddFavorit e('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
I tried this code in a Domino hotspot button:
window.open ('www.google.com')
window.external.AddFavorit
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
what is ur IE version?
Partha
Partha
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.
ASKER
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.
ASKER
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.AddFavorit e('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
I tried this code in a Domino hotspot button:
window.open ('www.google.com')
window.external.AddFavorit
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.UIHelp er.1")
IEObj.AddFavorite "http://www.google.com","Google"
' Part 1
Dim retVal As Integer
retVal = Shell("explorer http://www.google.com", 1)
' Part 2
Dim IEObj As Variant
Set IEObj = createobject("Shell.UIHelp
IEObj.AddFavorite "http://www.google.com","Google"
Partha