Fix javascript user id not being sent

Fix javascript user id not being sent

I need someone who is good with javascript and Laravel to fix a gift plugin it does not send the userid on submission

This is the data that is being submitted

data={to_user: $('#userid_gift').val(),gift_id:gift_id,msg:msg};

this is from the console view


the gift id is there but the to_user is empty so it fails


This is the Javascript code that is used in the forms

<script type="text/javascript">
if( @if(request()->is('profile/*')) true @else false @endif ){
var gift = $(this).parent().parent().find('.giftimage.activegift');
var gift_price'price');
var gift_id'giftid');
var msg='';
data={to_user: $('#userid_gift').val(),gift_id:gift_id,msg:msg};
type: "POST",
url: "{{{ url('/send_gift') }}}",
data: data,
success: function(data){



error: function(XMLHttpRequest, textStatus, errorThrown) {

This is on a seperate php file


$('#userid_gift').val('<?php echo e($user_id); ?>');



I need the to_user to get populated with the correct info i.e.


523 being the user the gift is getting sent too

Skills Required

Php Js Javascript Laravel


**** quitely easy job ****

i can fix it with in 2 hours,
please ping me

i can do this easily.

Bid On Listing Created 7 years ago in Programming

Other jobs by mikeboy