I have created some variables in my JS file and linked it to my webform in Xhtml code, my js code is as follows:
var access_key = 'my key';
var email_address;
var valid_format,smtp_check,disposable,mxfound,Urole;
// verify email address via AJAX call
function verify()
{
$.ajax({
url: 'domain/api/check?access_key=' + access_key + '&email=' +
email_address,
dataType: 'jsonp',
success: function validate(json) {
valid_format = json.valid_format ;
smtp_check = json.smtp_check ;
disposable = json.disposable;
mxfound = json.mxfound ;
Urole = json.role ;
}
});
}
I need to use variables (valid_format,smtp_check,disposable,mxfound,Urole) from the js part in the Signup.aspx.cp file.
Note: I have linked myJs.js to Signup.aspx file.(myJs is not original name just for example purposes)