Home All Groups Group Topic Archive Search About

How can I access an MSTextbox via Javascript?

Author
7 Apr 2005 12:31 PM
aaa
I was unable to get this to work with MS Web Textbox only html. In other
words the javascript says the object doesn't exist when I try to reference
the Textbox1:

document.all["Text1"].setAttribute("value", oCell.getValue());

Author
7 Apr 2005 2:19 PM
mkn
Not sure this is the best way as I'm new to this domain, but I tested this
successfully:

    textbox = document.getElementById('TextBox1');   
    textbox.setAttribute("value", "testing");   

Show quoteHide quote
"aaa" wrote:

>  I was unable to get this to work with MS Web Textbox only html. In other
> words the javascript says the object doesn't exist when I try to reference
> the Textbox1:
>
> document.all["Text1"].setAttribute("value", oCell.getValue());
>
>
>
Author
7 Apr 2005 4:32 PM
aaa
that doesn't work.

Show quoteHide quote
"mkn" <m**@discussions.microsoft.com> wrote in message
news:81A3CA43-FDC4-49B7-A784-2E7AF2D2E32C@microsoft.com...
> Not sure this is the best way as I'm new to this domain, but I tested this
> successfully:
>
> textbox = document.getElementById('TextBox1');
> textbox.setAttribute("value", "testing");
>
> "aaa" wrote:
>
> >  I was unable to get this to work with MS Web Textbox only html. In
other
> > words the javascript says the object doesn't exist when I try to
reference
> > the Textbox1:
> >
> > document.all["Text1"].setAttribute("value", oCell.getValue());
> >
> >
> >