Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #15893 > unrolled thread
| Started by | chaimzv@gmail.com |
|---|---|
| First post | 2012-09-15 03:36 -0700 |
| Last post | 2012-09-15 12:27 -0700 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.javascript
Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> chaimzv@gmail.com - 2012-09-15 03:36 -0700
Re: Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> Luuk <luuk@invalid.lan> - 2012-09-15 14:17 +0200
Re: Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-09-15 10:55 -0600
Re: Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> Luuk <luuk@invalid.lan> - 2012-09-15 19:48 +0200
Re: Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> chaimzv@gmail.com - 2012-09-15 12:26 -0700
Re: Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> chaimzv@gmail.com - 2012-09-15 12:27 -0700
| From | chaimzv@gmail.com |
|---|---|
| Date | 2012-09-15 03:36 -0700 |
| Subject | Accessing properties of <input type="text" id="DetailsView1_txtRowNumber"... /> |
| Message-ID | <3c28749c-3ca1-4983-bb5e-3176eae2b007@googlegroups.com> |
Using JavaScript (JQuery?), how to access properties of <input type="text" id="DetailsView1_txtRowNumber"... />
[toc] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2012-09-15 14:17 +0200 |
| Message-ID | <g88ei9-8q9.ln1@luuk.invalid.lan> |
| In reply to | #15893 |
On 15-09-2012 12:36, chaimzv@gmail.com wrote:
> Using JavaScript (JQuery?), how to access properties of
> <input type="text" id="DetailsView1_txtRowNumber"... />
>
<html>
<head>
<title>title</title>
<script>
function testthis() {
alert('testthis');
var i=document.getElementsByTagName('input');
alert ('Type:'+i[0].type);
alert ('id:'+i[0].id);
}
</script>
</head>
<body onload="testthis();">
<input type="text" id="DetailsView1_txtRowNumber"... />
</body>
</html>
[toc] | [prev] | [next] | [standalone]
| From | Martin Leese <please@see.Web.for.e-mail.INVALID> |
|---|---|
| Date | 2012-09-15 10:55 -0600 |
| Message-ID | <k32btu$smv$1@dont-email.me> |
| In reply to | #15894 |
Luuk wrote:
> <html>
> <head>
> <title>title</title>
> <script>
> function testthis() {
> alert('testthis');
> var i=document.getElementsByTagName('input');
> alert ('Type:'+i[0].type);
> alert ('id:'+i[0].id);
id's are unique within a page, so can just use:
var i=document.getElementById('DetailsView1_txtRowNumber');
alert ('Type:'+i.type);
> }
> </script>
> </head>
> <body onload="testthis();">
> <input type="text" id="DetailsView1_txtRowNumber"... />
> </body>
> </html>
--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
[toc] | [prev] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2012-09-15 19:48 +0200 |
| Message-ID | <hjrei9-kqe.ln1@luuk.invalid.lan> |
| In reply to | #15896 |
On 15-09-2012 18:55, Martin Leese wrote:
> Luuk wrote:
>> <html>
>> <head>
>> <title>title</title>
>> <script>
>> function testthis() {
>> alert('testthis');
>> var i=document.getElementsByTagName('input');
>> alert ('Type:'+i[0].type);
>> alert ('id:'+i[0].id);
>
> id's are unique within a page, so can just use:
> var i=document.getElementById('DetailsView1_txtRowNumber');
> alert ('Type:'+i.type);
>
>> }
>> </script>
>> </head>
>> <body onload="testthis();">
>> <input type="text" id="DetailsView1_txtRowNumber"... />
>> </body>
>> </html>
>
yep,
But most of the times you will have more than one 'input'...
And i cannot think why *every* input should have a unique id....
[toc] | [prev] | [next] | [standalone]
| From | chaimzv@gmail.com |
|---|---|
| Date | 2012-09-15 12:26 -0700 |
| Message-ID | <265d10c7-0e50-456a-8b26-29aaa25e04cc@googlegroups.com> |
| In reply to | #15893 |
On Saturday, September 15, 2012 1:36:56 PM UTC+3, (unknown) wrote: > Using JavaScript (JQuery?), how to access properties of > > <input type="text" id="DetailsView1_txtRowNumber"... />
[toc] | [prev] | [next] | [standalone]
| From | chaimzv@gmail.com |
|---|---|
| Date | 2012-09-15 12:27 -0700 |
| Message-ID | <1d0fa7b0-6d52-444d-8cf5-364fbb49a61e@googlegroups.com> |
| In reply to | #15900 |
On Saturday, September 15, 2012 10:26:16 PM UTC+3, (unknown) wrote: > On Saturday, September 15, 2012 1:36:56 PM UTC+3, (unknown) wrote: > > > Using JavaScript (JQuery?), how to access properties of > > > > > > <input type="text" id="DetailsView1_txtRowNumber"... /> THANK YOU VERY MUCH.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web