Solved

Sending Data to a web server

Posted on 2002-03-06
7
287 Views
Last Modified: 2010-05-02
Hi all,
I want to connect to a site that request a user name and password fields from VB.
I want to to retrieve the next page (agetr the login page) and to do everything automatic from my VB program.
the site is a cgi site with jsp pages.
how do I do it? please send me a code example.
thanks,
Julian
0
Comment
Question by:Netsal7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6844817
use the web browser control: (Microsoft Internet Controls)

and do something like this:

Private Sub Command1_Click()
WebBrowser1.Navigate ("http://<url>")
While WebBrowser1.Busy
    DoEvents
Wend

'' obviously the "Form1" is name of form and "userName" is textbox for name and "userPass" is textbox for passwd
WebBrowser1.Document.Forms("Form1").Item("userName").Value = "<userName>"
WebBrowser1.Document.Forms("Form1").Item("userPass").Value = "<userPass>"
WebBrowser1.Document.Forms("Form1").Submit

MsgBox WebBrowser1.Document.body.innerHTML

End Sub
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 100 total points
ID: 6844820
repost so it looks nicer

Private Sub Command1_Click()
WebBrowser1.Navigate ("<url>")
While WebBrowser1.Busy
   DoEvents
Wend

'' obviously the "Form1" is name of form and "userName" is textbox for name and "userPass" is textbox
for passwd
WebBrowser1.Document.Forms("Form1").Item("userName").Value = "<userName>"
WebBrowser1.Document.Forms("Form1").Item("userPass").Value = "<userPass>"
WebBrowser1.Document.Forms("Form1").Submit

MsgBox WebBrowser1.Document.body.innerHTML

End Sub
0
 

Author Comment

by:Netsal7
ID: 6847176
and id the site uses SSL?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 17

Expert Comment

by:inthedark
ID: 6847202
Do you need a visual inteface or are you making a background DLL/Service?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6847448
the above code doesn't work for a site using ssl?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7610504
Hi Netsal7,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bobbit31's comment(s) as an answer.

Netsal7, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:modulo
ID: 7657345
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month4 days, 22 hours left to enroll

635 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