473,378 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

What Happened to getElementsByTagName in ASP.NET 2.0 Javascript?

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?
Mar 8 '07 #1
3 5518
"Ea******@HighFlyingBirds.com"
<Ea************************@discussions.microsoft. comwrote in message
news:C4**********************************@microsof t.com...
What happened to it?
JavaScript is entirely independent of ASP.NET - all ASP.NET can do with it
is stream it down to the browser...

Presumably, all your other JavaScript works...?

Also, there is at least one reported bug with getElementsByTagName in IE7,
so you might have found another one...:-)
http://ejohn.org/blog/object-getelem...gname-ie7-bug/
Mar 8 '07 #2
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.

"Mark Rae" wrote:
"Ea******@HighFlyingBirds.com"
<Ea************************@discussions.microsoft. comwrote in message
news:C4**********************************@microsof t.com...
What happened to it?

JavaScript is entirely independent of ASP.NET - all ASP.NET can do with it
is stream it down to the browser...

Presumably, all your other JavaScript works...?

Also, there is at least one reported bug with getElementsByTagName in IE7,
so you might have found another one...:-)
http://ejohn.org/blog/object-getelem...gname-ie7-bug/
Mar 8 '07 #3
"Ea******@HighFlyingBirds.com"
<Ea************************@discussions.microsoft. comwrote in message
news:0C**********************************@microsof t.com...
>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...?
Mar 8 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... Okay, I have the JS listed below that calls for the display of the (DIV) tag... cookie function not included, as don't feel its necessary but you'll get the...
3
by: John Smith | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <div id="navcontainer"> <ul...
2
by: X t l a n | last post by:
Hi. I'm trying to get a reference to all comments on particular level of tree. lev.getElementsByTagName('#comment') - this expression dosn't work at all lev.getElementsByTagName('!') - this...
3
by: Andy | last post by:
Hello, I have the following example XML: <data> <package> <packageid>123</packageid> <package_article> <articleid>article1</articleid> </package_article> </package>
1
by: Max | last post by:
Hello everyone! i would want to know if the getElementsByTagName() function starts to find the elements from documentElement comprising the same documentElement. XML example: <?xml...
4
by: hanseymoon | last post by:
Dear newsgroup: I've got this long function, which works good overall to spell check words from a dictionary and I am not in a position to replace it. Can someone please see where or how it...
4
by: mcsdwarken | last post by:
Hello everyone! I used the code to get all elements with same tag from XML returned from the server: persons = xmlhttp.responseXML.getElementsByTagName("person"); It had worked perfect,...
5
by: Andy Chambers | last post by:
Hi, On both Opera and Firefox, getElementsByTagName doesn't find anything apart from <optionelements inside a select element. Why is this? Here's a page that demonstrates this behaviour. I'd...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.