Search custom form with post request datatable not working - datatable

Hello everyone can i search with post request in datatables?
backend -> django
frontend -> html/css jquery
In backed django I'm using the django_serverside_datatable library for populating data.
Please guide me. I see in datatables no option for post searching if you know anyway please let me know.i read https://datatables.net/ but no option for handling post request on my custom form and populating data into existing table.
I make a custom form have two fields username and email and i make a button form search if i click on search button then i search by email or username by my own post request and populate the data into table. i search data using post method of form not GET method of form

Related

Is it possible to protect Get Requests in Spring Boot MVC with Recaptcha (inside the Spring Boot Application)

Let's say when you send a request to this url: ...?query=something&filter=another_thing, I am returning a web page with model attribute let's say model.addAttribute('result', resultList) then just for loop the result and print the values. (Template resolver could be jsp or thymeleaf, but there is no option to load resultList without model fashion - I mean there is no ajax request - )
What I want to do:
before loading the result (or loading the page), I just want to load google recaptcha.js first and
recaptcha will return a token,
then I will send token to the backend via ajax request.
After all if request is not bot, I will print the resultList
Is this requirement possible to implement inside the Spring boot application itself?
NOTE: I could not find anyway to do this. I just though that I could intercept the original get url then redirect to the another page, and this page will load recaptcha and send the token to my backend. If it is not bot then redirect to the original get url. However I do not know how to preserve original request
You're framing it slightly wrong, which may make all the difference.
When making a request, you want to make sure that request is authorized, before you handle
it.
That is where a recaptcha comes in.
To prevent unauthorized access, look into spring-security and recaptcha for that.
Once sufficient authentication has been achieved, your request will then enter your controller, and you can serve the page.
(of course, you could look into it doing it dynamically, but that will be a bit harder)

FosUserBundle Return json when on login action via Ajax Http Post

When I perform a login via FosUserBundle on my Symfony3 project I want to return an Ajax response instead of the html of the3 lgoin form.
As fas I searched I found that there is a fos_user_security_check that uses the FOSUserBundle:Security:check that checks if the user is loged in or not but I could not find either the source code of controller that performs the login or any sort of custom trigger in order to do that.
I also looked into: http://symfony.com/doc/current/bundles/FOSUserBundle/index.html but I cannot find a clue.
The problem that you are facing is that Symfony's build-in authentication handler performs a redirect after a successful login or redirects back to the login form on failure. To handle AJAX logins you have to write your own authentication handler. This article explains it:
http://www.webtipblog.com/adding-an-ajax-login-form-to-a-symfony-project/

Codeigniter: Redirecting from one view to another without going through controller class

I am making a OAuth request to Google Contact API and want to redirect response to another page.
Is it possible without going through Controller? (I understand it will be against MVC model)
If yes then what will be my complete redirect url for another page which is in View folder. Because I have to provide it upfront on Google API Console.
What code have you tried? What data will be displayed on the view. If there's no data it will be easy.

Post Form data to different Domain in MVC application

I have tried to post Form data from my mvc site to Other domain without page refresh[Ajax.post]. But the form data not saved in other domain.While I am posting same data to normal form post:`This data saved into Marketo site.
Can you suggest if there is any possible way to post the form data to cross domain without page refresh?
First Name:
Email Address:
Subscription
I have tried to post Form data from my mvc site to Other domain without page refresh[Ajax.post]. but the form data not saved in other domain.
That is because of the Cross Origin Resource Sharing (CORS) restriction
and to circumvent the CORS one of the possible solution is to make a proxy on your server side and have that proxy talk to the other domain that i thin what you mean by "while i am posting same data to normal form post[]. this data saved into Marketo site."
Can you suggest if there is any possible way to post the form data to cross domain without page refresh?
JSONP
[Cross-domain Ajax -- brief introduction]
What is JSONP all about?

How we can check the information sent to server in a client request?

What are the information sent to server in a client request?How can we check those information? I mean can we view those information(Is there any way to check)?
The Net panel in Firebug is how i usually check both request and response for debugging.
you can get the value of the submission when you submit a form on a website by writing a script to be called when the form is submitted. For example, you've got a login form. The form consists of login and password fields.
This form makes a POST request to some location, defined in the form's action attribute:
<form action="myScript.php">
then, in your script, you would need to use the request object to retrieve elements from it and those will be the info that your user submitted.

Resources