I can not figure out how to get the text from my text field login_ConfigPostken
to be sent through my POST ajax request. For this POST I need to send over the key_id, which is in the format of {"xtalk.user": "test"}
. The format of the message to be typed into my text field in {"<name of key>": "<value>"}
Code:
$('#sumbit_configPost').on 'click', ->
username = $('#login_username').val()
password = $('#login_password').val()
mac_id = $('#login_ConfigPostmac').val()
key_id = $('#login_ConfigPostkey').val()
console.dir key_id
console.dir data
$.ajax
type: "POST"
url: start_url + mac_id + "/config/"
dataType: "json"
data: {key_id}
crossDomain: true
cache: false
beforeSend: beforeSend
success: (data) ->
... Code Continues
Thank You In Address