Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  • Thread Tools
  • Rate This Thread
  1. #1
    New to the CF scene
    Join Date
    Nov 2015
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Understanding routing from AJAX load

    Hi There,

    I'm working on a legacy code. There's no comment, or developer for the application. Application is a mess not even followed MVC architecture.
    I'm new to web development, UI/UX, JS. Application is written in PHP, and mostly in Jquery.

    It gets more confusing, because Laravel framework is mounted on the legacy code. A part of the application uses Laravel, but not all.

    I've a javascript which is used for loading interfaces. Which looks like:

    Code:
    function loadInterface(func, data) {
    	
        if (data == null) data = {}
        current_func = func;
        
        detail_history = new Array();
        $("#ajaxcontentbin").load("index.php", jQuery.extend(data, { 'ajax': '', 'func': func, 'parentid': '' }));
        alert("File name is "+  current_func+ " data is ", data); //to know the func
    }
    ajaxcontentbin
    is a div on index.mouse.php

    index.mouse.php -> is the main page where all the action takes place and not index.php.

    I've a func 'Illumina' as in the attached screen shot.

    I'm unable to figure out where the call goes after from loadInterface in javascript. I don't get it in routes.php, neither I get the call/flow back to index.mouse.php

    If I'm reading the function properly index.php is loaded with function and few variables. But index.php is the default file generated by laravel..
    Neither I see anything to be fixed in composer.json, autoload, psr-4.

    Any help would be highly appreciated.
    Attached Thumbnails Attached Thumbnails -illumina-png  


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •