Support the ongoing development of Laravel.io →
posted 9 years ago
Input
Last updated 2 years ago.
0
Solution

Why no form tag? It doesnt make much sense ... If you really want to go that way, JavaScript is your friend. I.e. (not tested at all):

$(function() {
    $("button").onClick(function(event){
        $.ajax({
            type: "POST",
            url: '{{$request->url()}}',
            data: {'email-select':$("select").val()},
            error: function() {alert('Request failed')}
        });
        event.preventDefault();
    });
});
0

Sign in to participate in this thread!

Eventy

Your banner here too?

nick2price nick2price Joined 20 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.