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?
randomguy
  • 12,042
  • 16
  • 71
  • 101
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.
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
1
2 3