?
Solved

Move string to an input on a html-page?

Posted on 2000-03-02
7
Medium Priority
?
143 Views
Last Modified: 2010-05-02
Hi,

i would be grateful if anyone knows how to move/copy a string from a textbox in VB to an input (text) on a html-page.


Thanks
0
Comment
Question by:Hogfather
[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
  • 4
  • 3
7 Comments
 
LVL 9

Expert Comment

by:samopal
ID: 2576739
dim ie as object
set ie = createobject("InternetExplorer.Application")
ie.visible=true
ie.navigate "www......"
ie.document.all("inputfieldname").value=.....

You can find "inputfieldname" if you view the source of HTML page

HTH
0
 

Author Comment

by:Hogfather
ID: 2596132
Adjusted points to 75
0
 

Author Comment

by:Hogfather
ID: 2596133
Maybe I didn't explain what I really wanted in my earlier question.

I know that samopals answer satiesfies my question but what i really want to work is this:
I have some data in a VB textbox, i.e."Username", when pressing a commandButton I would like this data to be transferred to an input (type="Text")on a html-page wich is opened in my default browser...

Maybe this will help explaining my initial question!

Thanks
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Expert Comment

by:samopal
ID: 2596201
Sorry, I only know how to do this with IE. May be somebody helps you with NN. But "default browser"... There is no common solution for all browsers (IMHO)
0
 

Author Comment

by:Hogfather
ID: 2597057
Okey...thanks Samopal, but I have a slight problem with your code you gave me...if I wan't this code to work on various pages how shall I do then. I mean if I don't know what the "inputfieldname" is and I wan't my program to find it automatically...could you help me with that?

Thanks
0
 
LVL 9

Accepted Solution

by:
samopal earned 300 total points
ID: 2597213
Yes, I can give you an idea

dim Element as object
For each Element in Ie.Document.All
  If Element.Tagname="INPUT" Then
     Element.Value = "...."
     Exit For
  end If
Next

But... It may be not only one INPUT element on the page. It may be TEXTAREA. If your page have Frames, then

Dim Fr as object
If Ie.document.frames.length>0 then
  For each Fr in Ie.Document.Frames
   For each Element in Fr.Document.All
     If Element.Tagname="INPUT" Then
       Element.Value = "...."
       Exit For
      end If
   Next
  Next
End If

What I want to say - it's impossible to find common solution.....
0
 

Author Comment

by:Hogfather
ID: 2597899
Thank you very much samopal!

I will give this a try!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month12 days, 20 hours left to enroll

777 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