Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Monday, 16 July 2018

Return JSON from a Laravel server from a different domain using javascript

Been tinkering for 3 hours how to get the things going. For the javascript side In web.php add the route For the controller make sure you have added ->setCallback($request->input('callback')) at the end of the json response.
Share:

Wednesday, 22 February 2017

Javascript Example To Call an Ajax

Example code in javascript to call an ajax

function changeDeliveryTime() {

    var deliveryMethod = $('#deliveryMethod').val();
    var delAddress = $('#delAddress').val();
    var schedule = $('#scheduleko').val();
 $.ajax({
  type : "GET",
  url : "/ajaxchangedeliveryschedule.do?deliveryMethod=" + deliveryMethod + "&address=" +  delAddress + "&scheduleId=" + schedule,         
  success : function(response) {
   //successfully change the time
   //alert('successfully change the time');   
  },
  error : function(e) {
   alert('Error changing time schedule: ' + e);
  }
 });
}

Share:

Tuesday, 21 June 2016

Saturday, 28 May 2016

How To Use Syntax Highlighter

Put this code before the </header> tag



Wrap your code in this tags




 change the html tag to these values 

actionscript3 bash, shell
c-sharp,
csharp
cpp,
c
css
 delphi,
pas,
pascal diff,
patch
groovy
 js, jscript,
javascript
java
jfx,
javafx
perl, pl
php
 plain,
text
ps,
powershell
 py,
python rails, ror, ruby
scala
sql
vb,
vbnet
xml,
xhtml,
xslt,
html,
xhtml
Share:

Popular Posts

Recent Posts

Pages

Powered by Blogger.

About Me

My photo
For the past 10 years, I've been playing with codes using PHP, Java, Rails. I do this for a living and love new things to learn and the challenges that comes with it. Besides programming I love spending time with friends and family and can often be found together catching the latest movie or planning a trip to someplace I've never been before.