JavaScript Index of same name element jquery same index name on different tables oracle,index match same

I have many elements with same name:

<input type="text" name="Education[GraduationDate][0]" />
<input type="text" name="Education[GraduationDate][1]" />
<input type="text" name="Education[GraduationDate][2]" />
<input type="text" name="Education[GraduationDate][3]" />

I want jquery give me the index number of selector name, so if I select first one give me number (0), and so on.

I did this with jquery:

 var arrayname = $(this).attr('name');
 var arrayindex = arrayname.substring(24,25);

arrayindex return me the Index that I want, but I think this is not good way to do that, because maybe You have index with 2 digit number, so the substring not work fine.

Please advice ..

Answer:1

hope this can help you:

...
var name = ($this).attr('name'); 
var digits = name.match(/\d+/g)
var index = digits.pop() // suppose your name has more than one digit, the last one is what you want(index) 
...
Answer:2

I'm currently using the command: $ ember build --watch --output-path=../public/ to build my ember app. Any ways of achieving the same thing but with a livereload? Thank you.

I'm currently using the command: $ ember build --watch --output-path=../public/ to build my ember app. Any ways of achieving the same thing but with a livereload? Thank you.

  1. ember build watch

I receive a base64 pdf from the server which I want to print. I have been trying the following: $.ajax({ type: "POST", url: url, data: blahblahblah, success: function(data) { ...

I receive a base64 pdf from the server which I want to print. I have been trying the following: $.ajax({ type: "POST", url: url, data: blahblahblah, success: function(data) { ...

  1. print base64 image
  2. print base64 pdf javascript
  3. print base64 encoded string python
  4. print base64 image html
  5. print base64 pdf
  6. print base64 python
  7. print base64 javascript
  8. print base64 image php
  9. print base64 pdf c#
  10. print base64 java
  11. print base64 string
  12. print base64.b64encode
  13. print base64 pdf java
  14. print base64 php
  15. print base64 html
  16. print base64 data
  17. print base64 golang
  18. print base64 bash
  19. print base64 c++
  20. java print base64 encoded string

If I create an Object as follows: window.Something = { X: function() { // statements... } }; What is the best way to access this object without using this? Example: If I call the X ...

If I create an Object as follows: window.Something = { X: function() { // statements... } }; What is the best way to access this object without using this? Example: If I call the X ...

I need pathname (www.my-site.com/this-part/and-this-part/etc/) in JS/jQuery but I need it as string not as object. In other words I need $_SERVER['REQUEST_URI']; in JS/jQuery. I've tried: var ...

I need pathname (www.my-site.com/this-part/and-this-part/etc/) in JS/jQuery but I need it as string not as object. In other words I need $_SERVER['REQUEST_URI']; in JS/jQuery. I've tried: var ...