|
-
Aug 10th, 2005, 02:39 AM
#1
Thread Starter
Junior Member
Posting to webpages with VB?
Hello everyone! New guy here :-)
I'm not the best with VB but I do have a bit of experience over the years with it. I hope this doesn't sound too simple!
I am attempting to make a simple program that helps a user keep up with posts they make to a message forum (ironically).
From within the program itself, I would like to add the option for the user to post a message directly to the website. However, it doesn't seem very easy. When I click on the post button on the website (manually in internet explorer to see how it posts), it seems to be written in Java (or something else for that matter, please excuse my ignorance) but the point is that it doesnt post to the website in your typical:
www .website .com/newpost.php?post=hello%20world&user=Josh
kind of way.
So therefore, I cannot use the webbrowser tool within VB to make it put what they are posting from VB's textbox, etc. I would like something as simple as:
VB Code:
web.navigate "http://www.website.com/newpost.php?post=TEXT1.TEXTuser=VBUSER" (assuming no spaces, etc in text1 for now)
as mentioned above, but obviously I don't think I will be able to do this.
Anyone ever ran into anything like this? I hope I have explained it well.
Thank you guys for any input.
-Josh
Nashville, TN
-
Aug 10th, 2005, 06:45 AM
#2
Fanatic Member
Re: Posting to webpages with VB?
Perhaps you're better off programmatically using the UI (i.e. clicking the button through code). Then you can let the actual posting be done by the site itself. To click a button use something along these lines; it makes use of the HTML Document Object Model. 
VB Code:
WebBrowser1.Document.getElementsByTagName("button").item(0).Click
Author for Visual Basic Web Magazine
-
Aug 10th, 2005, 07:22 AM
#3
Re: Posting to webpages with VB?
It should be:
VB Code:
web.navigate2 "http://www.website.com/newpost.php?post=" & Text1.Text & "&user=" & txtUser.Text
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|