Results 1 to 2 of 2

Thread: HTML INPUTBOX name=100

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    3

    Question HTML INPUTBOX name=100

    Please help.
    I've been able to push text into an Internet Explorer web document by specifying the following:
    where "ieWeb" is my Internet Explorer VB Object

    ieWeb.Document.Forms(0).myinputboxname.value = "test"

    I know for sure that this works. However, I've recently encountered a situation where the inputbox to where I want to push information into, is named a number like 102.
    For Example: <INPUT NAME="102" TYPE="TEXT" SIZE="7" MAXLENGTH="5">

    So I try to push text into it with:
    ieWeb.Document.Forms(0).102.value = "test"

    This gives me a compile "Invalid Syntax" error.
    If I put 102 in brackets or quotes, a different error comes up telling me that this "object doesn't support this Property or Method"

    What do I need to do to make this happen. I have no control over the name of that input box.

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    With some implementations of JavaScript, every element is put into an array, even if it has a unique name. So you may be able to call this element if it is in the same order everytime.

    document.Form[0].elements[0]

    It doesn't appear that you are using JavaScript, but VBScript may interact with the DOM the same way. I am not familiar with the ECMAScript standards, but you can play with it and find out.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width