Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Text on web page form
Hi All

I have found the code ( below ) to allow me to open the default browser and
load a web page.

Can anyone tell me how to auto-complete text in a text box on the opened
page.

The page that I will eventually load has a text input box ( called "Name" )
that I want to automatically fill in with a variable passed from VB.


Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long

Dim GoToWWW As String

GoToWWW = "http://www.mywebsite.com/TestPage.asp"
ShellExecute Me.hwnd, "Open", "about:blank", 0, 0, 0
ShellExecute Me.hwnd, "Open", GoToWWW, 0, 0, 1

Regards and thanks in advance for any replies

DaveO



Report this thread to moderator Post Follow-up to this message
Old Post
DaveO
09-26-04 02:03 PM


Re: Text on web page form
"DaveO" <jsinvest@mweb.co.za> wrote

> I have found the code ( below ) to allow me to open the default browser an
d
> load a web page.
>
> Can anyone tell me how to auto-complete text in a text box on the opened
> page.
>
> The page that I will eventually load has a text input box ( called "Name" 
)
> that I want to automatically fill in with a variable passed from VB.


Do you even need to open the page?  This site has a textbox that you
fill out:

www.dictionary.com

You could go there and type in "NEED" and hit the button, (as you
are trying to do programatically), but you don't need to.  Rather, just
go to the answer page, AS IF you filled in the box and hit the button:

http://dictionary.reference.com/search?q=need

The same with www.google.com


You could go there and type in SEARCH, and hit a button, (programmatically)
but you don't need to, just go to the answer page:

http://www.google.com/search?hl=en&ie=UTF-8&q=search

Will that help?

LFS


Report this thread to moderator Post Follow-up to this message
Old Post
Larry Serflaten
09-26-04 08:55 PM


Re: Text on web page form
Hi Larry

Thanks for the feedback.

However, I feel that I do need to open the web page and fill in the text in
the text box, as my app is to open the web page and fills in some info and
the user needs to fill in other text fields before they subit the web page /
form.

Regards

DaveO

---------------------------------------------------

"Larry Serflaten" <serflaten@usinternet.com> wrote in message
news:uigL7z9oEHA.648@tk2msftngp13.phx.gbl...

"DaveO" <jsinvest@mweb.co.za> wrote

> I have found the code ( below ) to allow me to open the default browser
and
> load a web page.
>
> Can anyone tell me how to auto-complete text in a text box on the opened
> page.
>
> The page that I will eventually load has a text input box ( called
"Name" )
> that I want to automatically fill in with a variable passed from VB.


Do you even need to open the page?  This site has a textbox that you
fill out:

www.dictionary.com

You could go there and type in "NEED" and hit the button, (as you
are trying to do programatically), but you don't need to.  Rather, just
go to the answer page, AS IF you filled in the box and hit the button:

http://dictionary.reference.com/search?q=need

The same with www.google.com


You could go there and type in SEARCH, and hit a button, (programmatically)
but you don't need to, just go to the answer page:

http://www.google.com/search?hl=en&ie=UTF-8&q=search

Will that help?

LFS



Report this thread to moderator Post Follow-up to this message
Old Post
DaveO
09-26-04 08:55 PM


Re: Text on web page form
"DaveO" <jsinvest@mweb.co.za> wrote
> Hi Larry
>
> Thanks for the feedback.
>
> However, I feel that I do need to open the web page and fill in the text i
n
> the text box, as my app is to open the web page and fills in some info and
> the user needs to fill in other text fields before they subit the web page
 /
> form.

Give them a form to fill in the other info, and then pass it all on to the s
erver.

You might also try filling the form in the call, for example,  you want to a
dd
the user's name, (Your Name Here)

http://www.google.com/advanced_sear...r%20Name%20Here

Go there, and see that the form has "Your Name Here" in the top textbox....

LFS

Report this thread to moderator Post Follow-up to this message
Old Post
Larry Serflaten
09-27-04 01:55 AM


Re: Text on web page form
Hi Larry

Thanks for the feedback.

I have found that I am unable to shellExecute to a URL ( with additional
field values at the end of the URL ) to a htm or html page and get it to
fill in text into a form field.

I can, however, change the html page to a  .php  page ( as the page in
question resides on my own domain ) and code the .php page to accept a
variable passed in the url. I can now ShellExecute to a URL (with a variable
attached) and get the page to open with the passed data automatically filled
in on the page's form.

This has solved my problem.

Regards and thanks again for the input
DaveO
---------------------------------------------------

"Larry Serflaten" <serflaten@usinternet.com> wrote in message
news:OOog03%23oEHA.3460@tk2msftngp13.phx.gbl...

"DaveO" <jsinvest@mweb.co.za> wrote
> Hi Larry
>
> Thanks for the feedback.
>
> However, I feel that I do need to open the web page and fill in the text
in
> the text box, as my app is to open the web page and fills in some info and
> the user needs to fill in other text fields before they subit the web page
/
> form.

Give them a form to fill in the other info, and then pass it all on to the
server.

You might also try filling the form in the call, for example,  you want to
add
the user's name, (Your Name Here)

http://www.google.com/advanced_sear...r%20Name%20Here

Go there, and see that the form has "Your Name Here" in the top textbox....

LFS




Report this thread to moderator Post Follow-up to this message
Old Post
DaveO
09-28-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:28 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.