Copy link to clipboard
Copied
I think this could be achievable ... any suggestions? Thank you!
i use:
function sendDataF(methodS,dataTypeS,urlS,dataObj,f){
$.ajax({
// the URL for the request
url : urlS;
// the data to send
data : dataObj,
// whether this is a POST or GET request
type : methodS,
// the type of data returned
dataType : dataTypeS,
// code to run if the request succeeds;
// the response is passed to the function
success : f,
// code to run if the request fails;
error: function(ts) { alert(ts.responseStatus); },
error : function(xhr, st
...Copy link to clipboard
Copied
yes, you can use ajax with animate and you can use jquery with animate.
one way to add jquery is to add an html5 component. another is to use the global include in the actions panel.
Copy link to clipboard
Copied
In the example, what is the missing code
Copy link to clipboard
Copied
i use:
function sendDataF(methodS,dataTypeS,urlS,dataObj,f){
$.ajax({
// the URL for the request
url : urlS;
// the data to send
data : dataObj,
// whether this is a POST or GET request
type : methodS,
// the type of data returned
dataType : dataTypeS,
// code to run if the request succeeds;
// the response is passed to the function
success : f,
// code to run if the request fails;
error: function(ts) { alert(ts.responseStatus); },
error : function(xhr, status) {
var errorS = '';
for(s in xhr){
errorS += s+' : '+xhr+'\n';
}
alert('Sorry, there was a problem!\n'+errorS+'\nstatus:'+status);
},
// code to run regardless of success or failure
complete : function(xhr, status) {
var errorS = '';
for(s in xhr){
errorS += s+' : '+xhr+'\n';
}
}
});
}
Copy link to clipboard
Copied
I'm not sure, kglad. Your answer looks very generic and I do not know how to implement it in the example without making mistakes in my effort to try to prove it.
The example is quite descriptive and should be simple to answer. The idea is to send the contents of the variables "x_user" and "x_pass" to "check_member.php".
Then, back in Animate, present the answer, that is, whether the member exists or not in the registry.
Copy link to clipboard
Copied
use the code i suggested and:
var dataObj={x_user:x_user,x_pass:x_pass}
sendDataF('POST','html','path to your php file/filename.php',dataObj,parseResponseF)
function parseResponseF(htmlS){
alert(htmlS);
}
Copy link to clipboard
Copied
Things are getting more and more strange.
How is it possible that so many lines of code are needed to replace two lines of old code? If that is the case then things have gone wrong. And I mean, very, very wrong.
Copy link to clipboard
Copied
feel free to look for other answers or further elucidate your conservation of code lines theory.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Friend, your answer is awesome, but could you send an example animate file with the script and php file with database connection?
That would help me a lot.