Login / Register  search  syndication  about

          Ryan Farley's Blog

Ryan Farley on .NET Development with a focus on CRM Development for SalesLogix

Reading HTML from a URL via VBScript

I came accross and interesting question in the SalesLogix Business Partner newsgroups. Someone needed to read the return from a webpage from a SalesLogix VBScript. They were trying to use the WebBrowser control and pull the HTML returned after setting the URL (which you can't do with the SLX WebBrowser control). Anyway, XMLHTTP is the right way to do this.

If all you want to do is read what is returned from a URL then use something like XMLHTTP from the MS XML parser to read the data from the URL. Here's a sample that will read the HTML from Google.com and place the results in a TextBox.


Dim objHttp

Set objHttp = CreateObject("Msxml2.ServerXMLHTTP")
objHttp.Open "GET", "http://www.google.com/", False

Text1.Text = objHttp.ResponseText
Set objHttp = Nothing


What's This?
Bookmark and Share

About Ryan Farley

   Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

View the SalesLogix Mobile Seveloper Series
View the SalesLogix SData Developer Series
View the Git for the SalesLogix Developer series

Related Content
   Confirming Actions With an "Are you sure?" Prompt in Infor CRM (Saleslogix)
I'm not a huge fan of bugging end users. I figure, if an end user clicked something, he or she meant
Posted on Nov 18, 2014 by Ryan Farley to Ryan Farley's Blog
   Delivering Data & Schema in SalesLogix Bundles
If you've had any exposure to SalesLogix, you'll have used a bundle. Bundles are great, but when
Posted on Apr 24, 2014 by Ryan Farley to Ryan Farley's Blog
   Using a Test Plan
So you have approved the Statement of Work (SOW) for some modifications and are awaiting the delivery of
Posted on Mar 13, 2014 by George Jensen to George Jensen's Blog
   Creating a Saleslogix Ticket Pretty Prefix and Suffix in External Applications
Some entities in SalesLogix, such as Tickets, use a "pretty key" as an easier to use value to r
Posted on Feb 28, 2014 by Ryan Farley to Ryan Farley's Blog
   Evaluating strings in C# Code snippets
When checking for two (or more) different values for a property in a code snippet, you can't simply l
Posted on Dec 13, 2013 by Jason Buss to Jason Buss' Blog


Norman Rice said:

In SLX 6.2 you can get the HTML from the SLX Browser control. See LoadSnapShot event in the Opportunity Detail form
July 26, 2004 1:21 PM

Ryan Farley said:

Thanks for the tip Norman. Although, unless you need to see the HTML, I'd stick with just pulling it in code anyway. No need for the extra overhead to render if you don't need it ;-)

Thanks, Ryan
July 26, 2004 1:23 PM

Rouan van Niekerk said:

Thanks Ryan, I've been trying four other scripts to get an ASPX page called... to switch an RS232 actuator.... to switch my ligths on/off.... your's did it. Regards Rouan - South Africa

April 17, 2009 8:31 AM
All contents Copyright © 2014 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register