$( "#result" ).load( "ajax/test.html" );
How can I pass some parameters using the links above to check whether to allow access or not and then return response lastly check for response.
$( "#result" ).load( "ajax/test.html" );
How can I pass some parameters using the links above to check whether to allow access or not and then return response lastly check for response.
The parameter after the page you’re wanting to load is is a data object that contains the information you want to check. That data is given to the parameter 1 page which returns a response.
After that parameter is a function that receives the response.
See https://api.jquery.com/load/ for details and an example.
How do I check for that data?
The documentation page says:
The POST method is used if data is provided as an object; otherwise, GET is assumed.
The page that you load receives the data as a POST method.
How that page checks for data though has nothing to do with JavaScript, but frequently people use a server-side solution such as PHP to do things like that.
I recommend that you make further enquiries about checking for POST data in our PHP forum, which is one of the popular server-side solutions that are commonly used.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.