Skip to content
Advertisement

how can I separate the data where I used split and the one I want to see the whole data using JQuery?

So what my output does is that when I select a tools name it automatically picks the specification on it and shows the control number, the only problem is when I create multiple data to specify my tools name it only shows the first specified tools name in that data and in my console.log it shows an array.

Here is the picture of my form

enter image description here

Here is my console.log(response) output

JavaScript

Here is my console.log(shouldSplit) output

JavaScript

Here is the result of what I am getting from ajax to form

JavaScript

Here is my javascript code

JavaScript

And here is my ajax code

JavaScript

?>

Advertisement

Answer

You can just add a loop in you success function to concat/join all array values.

So, the function would look something like below.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement