I'm not an expert in jQuery/ajax - but I work with Classic ASP.
I'm using this Gender API - https://gender-api.com/en/ to discover the gender of an user based on his first name.
They had an API/jQuery plugin:
https://gender-api.com/en/jquery-plugin
The API has a limit of free use.
Because of this my idea is to get the gender of each user when he log on the site and record the gender on the SQL table.
Then when the same user returns - I only read my SQL table - and no more the API (reducing the free use)
My great problem is, how can I get the gender result with this jQuery plugin (I think this will return the result on client) if all ASP code will work on server?
It's possible? Any ideas?
Thanks a lot!
Update 1:
I got the gender using ajax:
$.get( "https://gender-api.com/get?name=Daniel", function( data ) {
$( "body" )
.append( data.gender ); //
}, "json" );
This will append the gender on html body..
I think the best way to send this gender to ASP is to redirect the page to another "Update.asp" page - like: "update.asp?gender=xxx"
How can I redirect the page usign jquery?