Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: LS Loopholes and Bugs

LS Loopholes and Bugs 11 Monate 2 Wochen her #99102

  • LSLSLS
  • LSLSLSs Avatar
I'm using LS Version 1.92+ Build 120919

I'm making an auto complete thing that when you do it, your answer gets recorded into LS. I have checked the workarounds and based my code project on it:

The JS:
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script charset="utf-8">
 
    $(document).ready(function() {
        var qID = Question_ID;
        var php_location = "file:\Users\file_location\code.php";
        var container = [];
 
        $.getJSON(php_location,function(data){
            $.each(data,function(i, item){
                container.push(item);
            });
 
            $('#question'+qID+' input.text').autocomplete({
                source: container
            });
 
        });
 
    });
 
</script>
 
 
</script>



The PHP:
<?php
 
        $drugs = array();
 
        $search = fopen("medication.csv", "r");
 
        while (!feof($search) ) {
        $line_of_text = fgetcsv($search);
        array_push($drugs, $line_of_text[0]);
        }
 
        fclose($search);
 
        echo json_encode($drugs);
 
?>
 


I just want it to read a one column excel file.



Now, How do I import my code into LS? Please explain the process like I'm 5 :)!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

LS Loopholes and Bugs 11 Monate 2 Wochen her #99105

  • LSLSLS
  • LSLSLSs Avatar
Also if you see any bugs, tell me :woohoo:
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.165 Sekunden
Donation Image