Solved

Move string to an input on a html-page?

Posted on 2000-03-02
7
142 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
Industry Leaders: 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!

 
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 75 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

724 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