Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTA difficulty... getting url source with VBScript

Status
Not open for further replies.

JahDW

IS-IT--Management
May 22, 2003
31
US
I have an HTML Application (HTA) that uses a form to input a username, and then loads an ASP page that displays information pertaining to that username. I am currently using window.open, which opens the URL in a new window, but I would rather the information be displayed on the same page (NO FRAMES). Is there any way I can open the URL in a hidden window, capture its source, and pull the source into my HTA?

I've tried using an iFrame with no success... window.open seems to always open a new window regardless of the specified target. Plus, it must remain an HTA and not be changed to an HTML extension.
 
a username is typed into a text box. Then there are various radio buttons that will return certain information that pertains to that username. When a radio button is clicked (for instance the User Info from Active Directory) the results are displayed in a table. Certain radio buttons are for displaying SMS information, and are linked to an ASP. These open in a new window, but I want to be able to display then in the table.

I'm playing with XMLHTTP, but haven't had any success yet.
 
You can retrieve info from any web site using WinHTTP

Code:
Set http = CreateObject("WinHttp.WinHttpRequest.5.1")
  
'Open URL the Url
http.Open "GET", "[URL unfurl="true"]http://www.google.com",[/URL] False
  
'Send the http request
http.Send()

'Retrieve result into string
sResult = http.ResponseText
  
wscript.echo sResult

Then you can filter out whatever you don't want from sResult. Hope this help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top