Support the ongoing development of Laravel.io →
Views Forms
Last updated 2 years ago.
0
Solution

As shown in many articles all over the internet, just lose all the value:

function sendDelete(id){
    form = document.getElementById('social_form');
    form.id = id;      
    form.action = '/users/{{ Auth::user()->username }}/social/delete';
    form.method = 'DELETE';
    alert(form.action);
    //form.submit();
 }
Last updated 2 years ago.
0

Thank you so much, sisou! Clearly, I was making a simple javascript mistake. Nonetheless, I appreciate your help!
I ended up removing the .value for the action. The other .values were needed as I was setting field values. All is working now. Thanks again! You've been a great help.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.