E
E
EVOSandru62015-10-20 13:08:31
JavaScript
EVOSandru6, 2015-10-20 13:08:31

How to display data keys as variable values ​​in jquery?

Good afternoon,

There is an ajax request:

csrfTokenName  = 'xxx';
csrfTokenName  = 'yyy'


ajax({
...
data:{
csrfTokenName : csrfToken,
}

...


How to make csrfTokenName read exactly as the value of a variable, and not as a string?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Io, 2015-10-20
@EVOSandru6

Collect this array before feeding it to the data parameter and that's it. The easiest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question