Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

HTML Object Library...........posting a form

OK....here goes.

Our company intranet has a phone directory page, where you can enter a surname and a list of matching entries will be displayed.

I want to use this functionality in a VB app, but I'm not sure where to begin (or even if it's possible).

I assume I need to use the MS HTML object library to create an HTML document / HTMLFormElement and then submit this to the URL on my intranet. Not sure how to do this or how to interrogate any results I might get back.

Any ideas?.......or am I talking rubbish?



0
mrt1
Asked:
mrt1
  • 3
  • 2
  • 2
  • +2
1 Solution
 
inthedarkCommented:
There questions is what type of format is the data held?

Is it held in a database?


0
 
inthedarkCommented:
If you set a project component "Microsft Internet Transfer Control".

You can load you data using OpenURL.

Dim sData As String
sData = Inet1.OpenURL("http:\\yourserver\yoururl")

Now you have the HTML data in sData so you can decode the info you need.

Here is another more advanced method.

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20243482.html

The hard bit will be decoding the HTML, it depends on the info on the page.


If you paste the source code for the page we can help you decode it.
0
 
mrt1Author Commented:
I'm afraid I don't know how the data is held. It's just a jsp page which returns the results once the search criteria is entered and the button pressed.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rdrunnerCommented:
Wouldnt it be easier to access the DB diretly?

Getting all the Info you need out of a html Object can be quite tricky and its usually more work then just sending a querry to the DB. Can you find out who is responsible for that page and get the DB that is used?

0
 
RhaedesCommented:
...Depending on what you need, another basic possibility is to add a webbrowser control to your app and navigate it to the jsp page:

webbrowser1.navigate2 ("http://www.wherever.com/whatever.jsp")

This amounts to having an explorer window integrated in your app which you can use just like a browser.
If you need your app to automatically pass some data to the webbrowser (say filling in the surname field) then this is easy, but you really need to know what the name or id of the textfield is in the html. (Or at the very least least where it appears.) If this is the case, post the html and we can tell you.
If, on the other hand, you need the app to extract data from the results returned (rather than just have them displayed on the screen), then, as others have commented, you will need to parse the html. Of course, in this case there is little point in using a webbrowser since you do not need to 'see' the webpage. (So you would use an Internet Transfer Control instead.)

Kindest regards,
Rhaedes
0
 
mrt1Author Commented:
I'm afraid I don't have MS Internet Transfer Control...any other way of doing this?
0
 
Richie_SimonettiIT OperationsCommented:
If you want, take a look on how to automate data entry in a web page at:
www.angelfire.com/realm/vb-shared/index.html under "IE DOM..." topic
0
 
Richie_SimonettiIT OperationsCommented:
Besides, It doesn't cares if it is a jsp page, the browser only will shows you a plain HTML page.
0
 
Richie_SimonettiIT OperationsCommented:
the link posted didn't solve your question?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now