Returns HTML for the specified URL.
Inet objects
servicereference.GetURL ( urlname, data )
Argument |
Description |
---|---|
servicereference |
Reference to the Internet service instance |
urlname |
String specifying the URL whose source data is returned in data |
data |
InternetResult descendant containing an overridden InternetData function that handles the HTML source for urlname |
Integer. Returns values as follows:
1 Success
-1 General error
-2 Invalid URL
-4 Cannot connect to the Internet
Call this function to access HTML source for a URL.
Data references a standard class user object that descends from InternetResult and that has an overridden InternetData function. This overridden function then performs the processing you want with the returned HTML. Because the Internet returns data asynchronously, data must reference a variable that remains in scope after the function executes (such as a window-level instance variable).
For more information on the InternetResult standard class user object and the InternetData function, use the PowerBuilder Browser.
This example calls the GetURL function. Iinet_base is an instance variable of type inet:
iir_msgbox = CREATE n_ir_msgbox
iinet_base.GetURL(sle_url.text, iir_msgbox)