Is there a way to enter text into an HTML Form edit field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Angus Comber

    Is there a way to enter text into an HTML Form edit field

    Hello

    I can run a command as below:

    start www.iteloffice.com

    this launches my web browser and opens up the url www.iteloffice.com

    What I want to do is open a particular web page and then insert some text
    into a field in an HTML form. Is there any way to do this.

    Once I can do this from a command prompt, my program will do this using
    Shellexecute. I want to extract some information from the user and then
    insert the vlaues in a form on my web site. Anyone got any ideas on how to
    do this?

    Angus Comber
    angus@NOSPAMite loffice.com


  • Martin Honnen

    #2
    Re: Is there a way to enter text into an HTML Form edit field



    Angus Comber wrote:

    [color=blue]
    > I can run a command as below:
    >
    > start www.iteloffice.com
    >
    > this launches my web browser and opens up the url www.iteloffice.com
    >
    > What I want to do is open a particular web page and then insert some text
    > into a field in an HTML form. Is there any way to do this.[/color]

    If you are on Windows and talking about MS Internet Explorer then you
    can use scripting (JScript, VBScript, if installed Python or Perl too)
    to automate Internet Explorer like you can automate other Windows
    applications like Word or Excel.
    Newsgroups that deal with such stuff are wsh (Windows Script Host)
    groups on the MS news server news.microsoft. com or JScript or VBScript
    groups on that server.
    Docs are here:
    <http://msdn.microsoft. com/workshop/browser/webbrowser/reference/objects/internetexplore r.asp>

    But of course if all you want to do is submit data to a URL then it
    doesn't need a browser necessarily, most programming languages
    (sometimes with the help of libraries) will allow you to send HTTP
    requests and receive the response.

    --

    Martin Honnen

    Comment

    • Angus Comber

      #3
      Re: Is there a way to enter text into an HTML Form edit field

      Basically I want a web page on my web site to open with a string of text
      (taken from the program the user will be running) entered into a field on a
      form on this web page.

      One way I could do it is call a perl script and pass it the text as a
      parameter. Then I can have a Perl script dynamically create the form for
      me. I was wondering if there was an easier way.

      Angus


      "Martin Honnen" <mahotrash@yaho o.de> wrote in message
      news:41fbc073$0 $803$9b4e6d93@n ewsread2.arcor-online.net...[color=blue]
      >
      >
      > Angus Comber wrote:
      >
      >[color=green]
      > > I can run a command as below:
      > >
      > > start www.iteloffice.com
      > >
      > > this launches my web browser and opens up the url www.iteloffice.com
      > >
      > > What I want to do is open a particular web page and then insert some[/color][/color]
      text[color=blue][color=green]
      > > into a field in an HTML form. Is there any way to do this.[/color]
      >
      > If you are on Windows and talking about MS Internet Explorer then you
      > can use scripting (JScript, VBScript, if installed Python or Perl too)
      > to automate Internet Explorer like you can automate other Windows
      > applications like Word or Excel.
      > Newsgroups that deal with such stuff are wsh (Windows Script Host)
      > groups on the MS news server news.microsoft. com or JScript or VBScript
      > groups on that server.
      > Docs are here:
      >[/color]
      <http://msdn.microsoft.com/workshop/b...ce/objects/int
      ernetexplorer.a sp>[color=blue]
      >
      > But of course if all you want to do is submit data to a URL then it
      > doesn't need a browser necessarily, most programming languages
      > (sometimes with the help of libraries) will allow you to send HTTP
      > requests and receive the response.
      >
      > --
      >
      > Martin Honnen
      > http://JavaScript.FAQTs.com/[/color]


      Comment

      • Martin Honnen

        #4
        Re: Is there a way to enter text into an HTML Form edit field



        Angus Comber wrote:
        [color=blue]
        > "Martin Honnen" <mahotrash@yaho o.de> wrote
        >[color=green]
        >>If you are on Windows and talking about MS Internet Explorer then you
        >>can use scripting (JScript, VBScript, if installed Python or Perl too)
        >>to automate Internet Explorer like you can automate other Windows
        >>application s like Word or Excel.
        >>Newsgroups that deal with such stuff are wsh (Windows Script Host)
        >>groups on the MS news server news.microsoft. com or JScript or VBScript
        >>groups on that server.
        >>Docs are here:
        >>[/color]
        >
        > <http://msdn.microsoft.com/workshop/b...ce/objects/int
        > ernetexplorer.a sp>[/color]
        [color=blue]
        > Basically I want a web page on my web site to open with a string of text
        > (taken from the program the user will be running) entered into a[/color]
        field on a[color=blue]
        > form on this web page.
        >[/color]

        As said, MS Internet Explorer on Windows can be automated with script,
        so you can use script to open an Internet Explorer instance, load a URL,
        access the document and its content once it is loaded, manipulate the
        content meaning for instance you can fill in data in some form controls,
        submit the form if needed. See the hints given above in my earlier reply
        to find details.


        --

        Martin Honnen

        Comment

        • Angus Comber

          #5
          Re: Is there a way to enter text into an HTML Form edit field

          I cannot assume my user has Internet Explorer. I need a very generic
          solution.

          Angus

          "Martin Honnen" <mahotrash@yaho o.de> wrote in message
          news:41fbcb05$0 $809$9b4e6d93@n ewsread2.arcor-online.net...[color=blue]
          >
          >
          > Angus Comber wrote:
          >[color=green]
          > > "Martin Honnen" <mahotrash@yaho o.de> wrote
          > >[color=darkred]
          > >>If you are on Windows and talking about MS Internet Explorer then you
          > >>can use scripting (JScript, VBScript, if installed Python or Perl too)
          > >>to automate Internet Explorer like you can automate other Windows
          > >>application s like Word or Excel.
          > >>Newsgroups that deal with such stuff are wsh (Windows Script Host)
          > >>groups on the MS news server news.microsoft. com or JScript or VBScript
          > >>groups on that server.
          > >>Docs are here:
          > >>[/color]
          > >
          > >[/color][/color]
          <http://msdn.microsoft.com/workshop/b...ce/objects/int[color=blue][color=green]
          > > ernetexplorer.a sp>[/color]
          >[color=green]
          > > Basically I want a web page on my web site to open with a string of[/color][/color]
          text[color=blue][color=green]
          > > (taken from the program the user will be running) entered into a[/color]
          > field on a[color=green]
          > > form on this web page.
          > >[/color]
          >
          > As said, MS Internet Explorer on Windows can be automated with script,
          > so you can use script to open an Internet Explorer instance, load a URL,
          > access the document and its content once it is loaded, manipulate the
          > content meaning for instance you can fill in data in some form controls,
          > submit the form if needed. See the hints given above in my earlier reply
          > to find details.
          >
          >
          > --
          >
          > Martin Honnen
          > http://JavaScript.FAQTs.com/[/color]


          Comment

          • David Dorward

            #6
            Re: Is there a way to enter text into an HTML Form edit field

            Angus Comber wrote:

            Please don't top post, it makes it very difficult to follow the tread.
            [color=blue]
            > I cannot assume my user has Internet Explorer. I need a very generic
            > solution.[/color]

            From what I gather, the user will be running a piece of software. They will
            then visit a webpage in their browser. This will be a process they do
            manually, the software they are running won't trigger the opening of the
            browser.

            As far as I know, the only way to do this would be using an ActiveX control,
            on a Windows system, running Internet Explorer, with low security settings.
            Webpages are not typically allowed to communicate with processes on the
            user's system, the security issues would be too severe.

            On the other hand, if the program were laucnhing the users default browser,
            it could url encode the data and append it as a query string. A server side
            process on the website could then read that value and populate the value
            attribute of the input element.


            --
            David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
            Home is where the ~/.bashrc is

            Comment

            • Martin Honnen

              #7
              Re: Is there a way to enter text into an HTML Form edit field



              Angus Comber wrote:
              [color=blue]
              > I cannot assume my user has Internet Explorer. I need a very generic
              > solution.[/color]

              As for the original question and the topic of this group, in HTML you
              would need
              <input value="input string">
              you somehow indicated you would know how to create that with Perl for
              instance so go that way if it solves your problem.
              As for entering data in a running browser instance from another program
              I don't think that is a topic here.

              --

              Martin Honnen

              Comment

              Working...