Solved

open a URL within lotus script

Posted on 2002-07-24
14
4,244 Views
Last Modified: 2013-12-18
I am attempting to open a URL form within a lotus script pop up window from within a navigator page.
I have the lotus script structure set, just need the urlopen command format for use within lotus script.
Here is the current code:

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim rc  As Integer
Dim Tranlink As Variant
     
Dim tempList(11) As String
tempList(0) = "DB2 SQL Error Codes v6"
tempList(1) = "DB2 v6 Messages and Codes"
templist(2) = "DB2 SQL Error Codes v6"
templist(3) = "DB2 SQL Wait Values v6"
templist(4) = "DB2 SQL Error Codes v7"
templist(5) = "DB2 v7 Messages and Codes"
templist(6) = "DB2 SQL Error Codes v7"
templist(7) = "DB2 Wait Values v7"
templist(8) = "MVS Abend Codes"
templist(9) = "File Status Keys plus VSAM Extended File Status Keys"
templist(10) = "IBM Bookmgr Bookshelf Manuals on VSAM"
templist(11) = "Just Enough SQL/QMF/SPUFI"
     
Tranlink  = workspace.Prompt( PROMPT_OKCANCELLIST,"Lookups", "Please Select a Reference Lookup from the list below or cancel ", "", tempList )
     
If Tranlink = "DB2 SQL Error Codes v6" Then
@URLOPEN("http://whatever")    
If Tranlink = "etc." Then
@OpenURL ................
End if
end if
end sub

Thank You !
Paul

                                   
0
Comment
Question by:pratigan
  • 5
  • 4
  • 3
  • +1
14 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7174503
Check URLOpen method in NotesUIWorkspace object

Syntax
Call notesUIWorkspace.URLOpen( Url$, reload%, urlList%, charset$, webusername$, webpassword$, proxywebusername$, proxywebpassword$, notesRetriever )


Parameters
Url$
String. Optional. The URL for the Web page you want to open, for example, http://www.acme.com/. If you omit this parameter, you see the Open URL dialog box where the user can enter the URL for the Web page.
reload%
Integer. Optional. Enter 1 (True) to reload the page from its Internet server. Enter 0 (False) to load the page from the Internet only if it is not already in the Web Navigator database. Enter 2 to reload the page only if it has been modified on its Internet server. The default value is 0.
urlList%
Integer. Optional. Web pages can contain URL links to other Web pages. This value specifies that the Web Navigator should save the URLs in a field called URLLinksn in the document.  (The Web Navigator creates a new URLLinksn field each time the field size reaches 64K.  For example, the first URLLinks field would be URLLinks1, the second would be URLLinks2, and so on.)
If you save the URLs, you can use them in agents; for example, you could create an agent that opens Web pages in the Web Navigator database and then loads all the Web pages saved in each of the URLLinksn field(s).
charset$
String. Optional.  Enter the MIME character set (for example, ISO-2022-JP for Japanese or ISO-8859-1 for United States) that you want the Web Navigator to use when processing the Web page.  Only use this parameter when the Web Navigator misdetects the correct MIME character set of the URL contents.
webusername$
String. Optional.  Some Internet servers require you to obtain a username before you can access their pages.  This parameter allows you to enter the username that you previously obtained from the Internet server.
webpassword$
String. Optional.  Some Internet servers require you to obtain a password before you can access their pages.  This parameter allows you to enter the password that you previously obtained from the Internet server.
proxywebusername$
String. Optional.  Some proxy servers require that you specify a username in order to connect through them.  This parameter allows you to enter the username for the proxy server. See your administrator for the username required by the proxy.
proxywebpassword$
String. Optional.  Some proxy servers require that you specify a password in order to connect through them.  This parameter allows you to enter the password for the proxy server. See your administrator for the password required by the proxy.
notesRetriever
Boolean. Optional. If set to False or omitted, the default browser opens the URL. If present, or set to True, the Notes Web Navigator opens the URL.

~Hemanth
0
 

Expert Comment

by:Jyoti
ID: 7174584
Hi Paul,

One cannot directly write Formula language within the script. you will have to include it within an Evaluate. What i am not sure about is whether evaluate would evaluate this function successfully :)

u can try the @Prompt functionality instead. Bulid a list separated by colons - "DB2 SQL Error Codes v6:DB2 v6 Messages and Codes..." etc and then write the if conditions to evaluate ur URL.

Code:
--------------
res1:=@Prompt([OkCancelCombo];"Title";"Message to select";"DB2 SQL Error Codes v6"; "DB2 SQL Error Codes v6":"DB2 v6 Messages and Codes":"DB2 SQL Error Codes v6")

@If (Res1="DB2 SQL Error Codes v6"; @URLOpen("http://yahoo.com");Res1="DB2 v6 Messages and Codes";@URLOpen("http://hotmail.com");"")

-------------

Hope this helps.

- Jyoti.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7175183
Hello Jyoti,

What is happening with your Transaction processing question ?

As a friendly note, don't block a question by proposing an answer. This will categorize this question to Locked Question so that the question is lost. Most of experts see only QAA and skip this unless there is someone who has patience to dig thru this LQ pile.

Paul, if you are not satisfied with proposed ans you can reject the answer, so that it reappears on the top of the list.
0
 
LVL 4

Author Comment

by:pratigan
ID: 7175234
I had checked this out and this was what I was coming up with.  Thats why I was wondering if there was some formatting problem that I was not aware of.
::)
I'm getting a message not a sub or function name for NOTESUIWORKSPACE. ?!?!?!  Any ideas.

Sub Click(Source As Button)
     Dim workspace As New NotesUIWorkspace
     Dim rc  As Integer
     Dim Tranlink As Variant
     
     
     Dim tempList(9) As String
tempList(0) = "DB2 SQL Error Codes v6"
tempList(1) = "DB2 v6 Messages and Codes"
templist(2) = "DB2 SQL Wait Values v6"
templist(3) = "DB2 SQL Error Codes v7"
templist(4) = "DB2 v7 Messages and Codes"
templist(5) = "DB2 Wait Values v7"
templist(6) = "MVS Abend Codes"
templist(7) = "File Status Keys plus VSAM Extended File Status Keys"
templist(8) = "IBM Bookmgr Bookshelf Manuals on VSAM"
templist(9) = "Just Enough SQL/QMF/SPUFI"
     
Tranlink  = workspace.Prompt( PROMPT_OKCANCELLIST,"Lookups", "Please Select a Reference Lookup from the list below or cancel ", "", tempList )
     
If Tranlink = "DB2 SQL Error Codes v6" Then
Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/2.1.6")
     Else    
If Tranlink = "DB2 v6 Messages and Codes" Then
     Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnmc0g3/CCONTENTS")    
     Else
If Tranlink = "DB2 SQL Wait Values v6" Then
     Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/APPENDIX1.3.1")          
     Else    
If Tranlink = "DB2 SQL Error Codes v7" Then
Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/2.1.6?SHELF=dsnshha2&DT=20010718150520")    
                    Else
                         If Tranlink = "DB2 v7 Messages and Codes" Then
                              Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/CCONTENTS?SHELF=dsnshha2&DN=GC26-9940-01&DT=20010718150520")    
                         Else
                              If Tranlink = "DB2 Wait Values v7" Then
                                   Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/APPENDIX1.3.1?SHELF=dsnshha2&DT=20010718150520")    
                              Else
                                   If Tranlink = "MVS Abend Codes" Then
                                        Call notesUIWorkspace.URLOpen("http://www.touniteamerica.com/programming/abend-codes.html")    
                                   Else
                                        If Tranlink = "File Status Keys plus VSAM Extended File Status Keys" Then
                                             Call notesUIWorkspace.URLOpen("http://www.simotime.com/vsmfsk01.html")    
                                        Else
                                             If Tranlink = "IBM Bookmgr Bookshelf Manuals on VSAM" Then
                                                  Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=vsam")    
                                             Else
                                                  If Tranlink = "Just Enough SQL/QMF/SPUFI" Then
                                                       Call notesUIWorkspace.URLOpen("http://www.touniteamerica.com/doc/jeqmfsql.doc")    
                                                  Else
                                                       
                                                  End If
                                             End If                        
                                        End If                    
                                   End If              
                              End If    
                         End If
                    End If
               End If
          End If
     End If
     
End Sub
0
 
LVL 4

Author Comment

by:pratigan
ID: 7175246
The current code above open up a second box already that I would like to keep.  I will attempt this approach as well.  But I would like to field other options first before selecting an answer.
*:)
Thanks !!
0
 
LVL 10

Accepted Solution

by:
zvonko earned 50 total points
ID: 7175451
Hello Paul,

here my version:
Sub Click(Source As Button)
  Dim workspace As New NotesUIWorkspace
  Dim rc  As Integer
  Dim Tranlink As Variant
  Dim urls List As String
  Dim tempList() As String
  Dim i As Integer
  urls("DB2 SQL Error Codes v6") = "http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/2.1.6"
  urls("DB2 v6 Messages and Codes") = "http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnmc0g3/CCONTENTS"
  urls("DB2 SQL Wait Values v6") = "http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/APPENDIX1.3.1"
  urls("DB2 SQL Error Codes v7") = "http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/2.1.6?SHELF=dsnshha2&DT=20010718150520"
  urls("DB2 v7 Messages and Codes") = "http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/CCONTENTS?SHELF=dsnshha2&DN=GC26-9940-01&DT=20010718150520"
  urls("DB2 Wait Values v7") = "http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/APPENDIX1.3.1?SHELF=dsnshha2&DT=20010718150520"
  urls("MVS Abend Codes") = "http://www.touniteamerica.com/programming/abend-codes.html"
  urls("File Status Keys plus VSAM Extended File Status Keys") =  "http://www.simotime.com/vsmfsk01.html"
  urls("IBM Bookmgr Bookshelf Manuals on VSAM") = "http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=vsam"
  urls("Just Enough SQL/QMF/SPUFI") = "http://www.touniteamerica.com/doc/jeqmfsql.doc"
  i = 0
  Forall url In urls
    i = i + 1
    Redim Preserve tempList(i)
    tempList(i - 1) = Listtag(url)
  End Forall
  Tranlink  = workspace.Prompt( PROMPT_OKCANCELLIST,"Lookups", "Please Select a Reference Lookup from the list below or cancel ", "", tempList )
  If (Tranlink <> "") Then Call workspace.URLOpen(urls(Tranlink))
End Sub

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7175461
Those redim was not ok.
Take this loop:
i = 0
Forall url In urls
  Redim Preserve tempList(i)
  tempList(i) = Listtag(url)
  i = i + 1
End Forall

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Author Comment

by:pratigan
ID: 7175520
As always Zvonko,
You are excellent.  I have applied your version and it works exactly as I wanted.
I Thank you very much.
As Always... your a truely valued resource.
Thanks Again !!
Paul

<:)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7175558
Thanks for the points and for the feedback Paul :-)

...but take care not to overpraise me :)

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7176084
Paul, What is so different about Zvo's comment. I believe my comment was the answer.

Better evaluate the comment fully before you can grade the question.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7176514
You could apply for a patent about reading Designer help, then you would not miss even this fifty points <|:)

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7177923
You shut up.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7179653
I Shot The Sheriff... <|:)

0
 

Expert Comment

by:Jyoti
ID: 7182122
Hi paul,
Looks like ive missed quite a discussion here :) its good that ur queries have been met.

Thanks hemanth ill keep it in mind not to suggest an answer. since i dont frequent this site unless in need i was not aware of the locking condition.

my question is still a doubt since a lot of people we know are still suggesting that we stick to notes environment alone saying that it will be able to handle this information. as this is also a customer decesion we have put them thru to some people at IBM. lets see what turns out. meanwhile iam trying to pick up on my DECS and LEI skills :)

cheers,
Jyoti
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
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…

707 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

13 Experts available now in Live!

Get 1:1 Help Now