Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $('select[id=currency-data]').change(function () {
  2.  
  3. var currency_id = $(this).val();
  4.  
  5. $.ajax({
  6. url: "{{Route('exchange-rate')}}",
  7. type: 'POST',
  8. data: {currency_id: currency_id },
  9. success: function(data){
  10. $('#ex-rate').val(data);
  11. }
  12. });
  13. });
  14.  
  15. {!! Form::label('currency_id', 'Currency:', ['class' => 'control-label']) !!}
  16. {!! Form::Select('currency_id', $currency_data, Input::old('currency_id'), ['id'=>'currency-data','class' => 'form-control','required']) !!}
  17.  
  18. {!! Form::label('exchange_rate', 'Exchange Rate:', ['class' => 'control-label']) !!}
  19. {!! Form::input('number','exchange_rate', Input::old('exchange_rate'), ['id'=>'ex-rate','class' => 'form-control','readonly','required']) !!}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement