Client Side Script working on Local but not on remote server

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
shahmiteshk
User
Posts: 9

Client Side Script working on Local but not on remote server

Post by shahmiteshk »

Below is the code I have written in client side event for table 07_membership_details

{ // keys = event types, values = handler functions
"change": function(e) {
// Your code

var $selectedmember =  $(this).fields("Membership_Id").value();
var membershiptypelist = $(this).fields("Membership_Type")
$.get("/dpcg/api/membershiptype/" + $selectedmember , function (res)
{
console.log("a");
membershiptypelist.value(parseInt(res));
console.log("a");
//console.log(res);
});
$(this).fields("Membership_Type").readonly(true);
}
}

And below is the related API code written in api_action

$app->get('/getaddonfee/{addonid}', function ($request, $response, $args) {
        $addonid = explode('#',$args["addonid"]) ?? null; // Get the input value
        if ($addonid !== null) {
          
        $response = "select sum(membership_addon_fees) from 03_membership_addon_fees where membership_addon_id =" . AdjustSql($addonid[0]) . " and (membership_addon_fees_start >= '" .  AdjustSql(@addonid[1]) ."' and membership_addon_fees_end <= '" . AdjustSql(@addonid[2]) . "' )";
          
        }
        return $response; 

Problem is when I select member in first drop down it should automatically select the membership type in next drop down.

On Local in cosole following is the output

a
userevent.js:1 a
userevent.js:1 3

On remote server I get this

a
userevent.js:1 a
userevent.js:1 <!DOCTYPE html>
<html>
<head>
<title>Dadar Parsee Colony Gymkhana</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/select2.min.css">
<link rel="stylesheet" href="/css/select2-bootstrap5.min.css">
<link rel="stylesheet" href="/adminlte3/css/adminlte.min.css">
<link rel="stylesheet" href="/css/sweetalert2.min.css">
<link rel="stylesheet" href="/plugins/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="/css/OverlayScrollbars.min.css">
<link rel="stylesheet" href="/css/dpcg.min.css">
<script data-pace-options='{.........

Any help will be greatful

Regards
Mitesh


arbei
User
Posts: 9359

Post by arbei »

You had PHP error, you should enable Debug and check the log files.


Post Reply