Questions tagged [name-attribute]
39 questions
662
votes
15 answers
In WPF, what are the differences between the x:Name and Name attributes?
Sometimes it seems that the Name and x:Name attributes are interchangeable.
So, what are the definitive differences between them, and when is it preferable to use one over the other?
Are there any performance or memory implications to using them the…

Drew Noakes
- 300,895
- 165
- 679
- 742
10
votes
3 answers
Make Jquery validation plugin work on inputs with no name attribute
Well it took me long enough to find out that the JQuery form validation plugin only works on fields with a "name" attribute.
Anyway, I use it to make all the fields required.
My problem is that at some point, I have one text input

lady_OC
- 417
- 1
- 5
- 20
7
votes
3 answers
How can I bind to a control without a Name or an x:Name?
Right, so I'm following a tutorial. This one, to be exact. Some code that it provides is this:

It'sNotALie.
- 22,289
- 12
- 68
- 103
5
votes
2 answers
Do all browsers ignore nameless input fields?
Is it guaranteed that a browser doesn't send an input element if it doesn't have the name attribute specified?
For example, can we assume that POSTing the form below won't send the credit card number?
4
votes
3 answers
Any hidden reasons to use ids instead of name attributes to identify fields in forms?
I am working on a large web application project and the previous designer favored the use of ids as handles to form fields over name attributes.
I suppose one advantage of this is that the lookup of that field via Javascript is faster through ids.
A…

David Sanders
- 4,069
- 1
- 24
- 38
3
votes
1 answer
R: multiply vector by matrix according to names
I've looked at some answers on matrix multiplication (e.g. R: matrix by vector multiplication) but still can't find an answer to my question:
I sell four types of fruit, with per-item prices in this vector:
prices <- c(2.25, 0.42, 0.85,…

Montgomery Clift
- 445
- 3
- 13
3
votes
3 answers
Javascript only firing once
long-time lurker here asking my first public questions because I am truly stuck.
I'm working on a hosted shopping cart platform so I only have access to add code in certain designated divs. I have a javascript code that I'm calling externally…

KateTheGreat
- 107
- 1
- 9
2
votes
1 answer
Can not find control with unspecified name attribute Angular 14
I'm facing the the following error.
And when I click at the line pointed with BLUE ARROW in the above image, it points to of of ngFor loop in my html template.
2
votes
2 answers
How to use jQueryValidation without using name attributes
I'm using jQueryValidation and I would like to validate my form without needing to use name attributes.
If the form elements don't have the name attribute only the first element is validated.
jQuery…

Diogo Cardoso
- 21,637
- 26
- 100
- 138
2
votes
4 answers
Why would some tags in an HTML form get a name attribute and others get a value attribute?
I was learning how to code an HTML form and I have few questions regarding the example I came across.
What is the difference between value and name in layman terms?
Why the value in the first two label's input left as an empty string?
Why the the…

Mohamed Hegazy
- 285
- 3
- 18
2
votes
1 answer
Using jQuery validator plugin, how to use dynamically created name attributes to assign rules?
Here's the problem:
The ecommerce system we uses generates a line item for each product purchased. It gives line item's quantity input the name attribute "qty0", "qty1", "qty2", and so on as the line items go down the page.
I need to check these…

brennanag
- 23
- 1
- 3
2
votes
3 answers
Why did they deprecate the 'name' attribute for HTML elements?
From what I understand, in HTML5 we're supposed to start using the id attribute to reference a elements, instead of the name attribute. The problem with this is that there is also a constraint that id should be unique per document.
Now, I see a lot…

alexw
- 8,468
- 6
- 54
- 86
2
votes
2 answers
Markup validation error when using CFForm
Does anyone know of a solution to the following markup validation error? I'm not sure if this is an issue in ColdFusion or my own code, but the output of the following snippet does not validate correctly on W3C markup validation service:
Code
…

Mohamad
- 34,731
- 32
- 140
- 219
2
votes
3 answers
Why does the 'name' attribute on my hidden input element change from what I set it to be?
Here is my markup:
This is what it looks like when the page is…

Taylor Brown
- 1,689
- 2
- 17
- 33
2
votes
2 answers
JQuery-Validation - using rules method on selected ID, why does the name attribute have to be present on the element?
I'm a little confused about the JQuery validation plugin behavior.
If I have the following JQuery:
$('#form1').validate({
/* other validation */
});
$('#txt1').rules("add",
{
required: true,
messages: { required: 'This is required!'…

Mike
- 399
- 2
- 9
- 19