For some days I made an autocomplete input with my teacher!
Now I try to check it again, but it does not work anymore!
My teacher is now singing for a while, so I have to see it alone.
But I do not know how to fix it. I actually tried to do this.)
It gives a $ _GET (Hence the problem is not)
JQuery:
var element = ''; Function split (val) {return valple split (/, \ s * /); } Remove the last (word) {return partition (word). Pop (); } GetSearchlocation function () {return $ (element) .data ('search term'); } $ (".tag") .bind ("keydown", function (event) {if (event.keyCode === $ .ui.keyCode.TAB & $ (this). Autocomplete ("instance"). Menuactive) {event.preventDefault ();}}) Autocomplete ({source: function (request, response) {$ .getJSON ('checklistHandler.php', {term: extractLast (request.term), searchlocation: GetSearchlocation ()}, response);} search: work () {var Term = extractLast (this.value); element = this; if (term.length & lt; 2) {return false;}}, focus: function), select {return false;}, select: function (event, UI) {Var word = partition (this.value); Terms.pop (); Terms.push (ui.item.value); Terms.push (""); This.value = terms.join (","); Return back;}}); handler:
if ($ _GET ['word']) {if ($ _ [find 'search_status'] == 'cursor' ) {$ Table = 'Flexible'; $ Column = 'app'; } Otherwise ($ _GET ['searchplace'] == 'speak') {$ table = 'boeken'; $ Column = 'name'; } Else {exit; } $ Search = $ _GET ['word']; $ Query = mysql_query ("SELECT". $ Column. "FROM". $ Table. "WHERE". $ Column. "Choice '%". $ Search. "%'"); $ Result = array (); $ I = =; ($ R = mysql_fetch_assoc ($ query)) {$ result] = array ('id' => $ i, 'label' = & gt; $ r [$ column], 'value' = & gt; $ r [$ Column]); $ I ++; } Echo json_encode ($ result); }
Input:
if ($ onderdeel ['formInputType'] == 'autocomplete') {? & Gt; & Lt; TR & gt; & Lt; Input type = "hidden" name = "buildblock [& lt;? = $ Onderdeel ['formBuildingBlockId']? & Gt;] [formBuildingBlockId]" value = "& lt;? = $ Onderdeel ['formBuildingBlockId']? & Gt; " & Gt; & Lt; Td square = "& lt;? = $ Class? & Gt;" Width = "320" style = "vertical-row: center;" & Gt; & Lt ;? = $ Onderdeel ['formInputLabel']? & Gt; & Lt ;? = ($ Onderdeel ['formRequired'] == 'at'? '& Lt; img title = "Verplicht Veld" alt = "Verplicht Veld" style = "position: relative; top: -10px; height: 5px; Width: 5px; "src =" '. IMG. "/ Asterisk_orange.png" & gt;': '')? & Gt; & Lt; / Td> & Lt; Td square = "& lt;? = $ Class? & Gt;" Width = "320" & gt; & Lt; Textarea style = "minimum-width: 212px; max-width: 212px;" Class = "tag" data-searchplace = "& lt;? = $ Onderdeel ['formInputOptions']? & Gt;" Name = "buildblock [& lt;? = $ Onderdeel ['formBuildingBlockId']? & Gt;] [content]" & lt ;? = ($ Onderdeel ['formRequired'] == 'but'? 'Required': '')? & Gt; & Gt; & Lt ;? = $ Onderdeel ['formContent'] & gt; & Lt; / Text field & gt; & Lt; / TD & gt; & Lt; Td square = "& lt;? = $ Class? & Gt;" Width = "60" style = "vertical-row: middle; text-align: center;" & Gt; Input type = "checkbox" name = "buildblock [[lt;? = $ Onderdeel ['formBuildingBlockId']? & Gt;] [check]" value = "1" & lt ;? = ($ Onderdeel ['formContentChecked'] == 1? Checked = "check" ':' ')? & Gt; / & Gt; & Lt; / TD & gt; & Lt; Td square = "& lt;? = $ Class? & Gt;" Width = "60" style = "vertical-row: middle; text-align: center;" & Gt; & Lt; A href = "checklisthandler.fp? Delete_disclosure = & lt;? = $ Test? & Gt;" & Gt; & Lt; / A & gt; & Lt; / TD & gt; & Lt; / TR & gt; By & lt;? } The response to the request is:
[{"id": 0, "label": "excel basis", "value": "excel base"}, "Label": "Excel", "value": "Excel", "value": "value": "Excel required"}, {"id": 2, "label": "Excel gevorderd", "value": "Excel: enlase enn conferente", "value" "excel: functions n formulas", "excel:", "excel:", "excel:", "excel:", "label": "excel:" " Value ":" excel: functions en formulas "}," excel: dretebelen en graffiken "}," edie: "," label "{" id ": 6," l "Flexible croson", "value": "word": "excel: copelling en n macro", "value": "excel: copellingen en macro \ u2019s", {"id": 7, "label" Complex Document "}]
I hope you May help me understand what is the problem
Greetings,
Matthew.
Problem solved!
The problem was ...
I asked wrong data from DB!
to $ onderdeel ['formInputOption'] $ onderdeel ['formInputName']
My apologies!
No comments:
Post a Comment