What Happened to getElementsByTagName in ASP.NET 2.0 Javascript?

G

Guest

I am writing an application using VS2005 and I am using javascript on the
client side. I have a table that contains textboxes and I want to set the
contents of all of them to the empty string in javascript. I cannot permit a
postback in this scenario. I want to find the textboxes by using:

var txtBoxes = document.getElementsByTagName("input");

I can then iterate the array and set the value for all inputs of type text
to the empty string. However, I find the getElementsByTagName function is
not there.

What happened to it? What's a good alternative to resolve this?
 
G

Guest

I understand this. But getElementsByTagName does not even show up in
Intellisense. Also I get a method not supported error on
document.getElementsByTagName. I am running IE7 so I guess it is not there.
 
M

Mark Rae

I understand this. But getElementsByTagName does not even show up in
Intellisense. Also I get a method not supported error on
document.getElementsByTagName.

Curious - I've just tried it, and the line belows working fine for me...

var aobjInput = document.getElementsByTagName('input');
I am running IE7 so I guess it is not there.

Me too.

Do all the other DOM-related JavaScript methods work...?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top