[jQuery] Help with getting variable

[jQuery] Help with getting variable


Hoping for some simple help here.
I have this structure in my forms
name="data[User][username]"
But depending on the form it the ['User'] section will change throught the
site. How can I pull the User as a variable?
The script has something like this:
$.post('/ajax_validate/users/', {
field: fieldName,
value: fieldValue
},
Where I want to add the variable like
$.post('/ajax_validate/'+myVarHere, {
field: fieldName,
value: fieldValue
},

Thanks,
Dave


















    • Topic Participants

    • dave