php - dynamic dropdown displays nothing -


I am trying to enable the movie by the title or actors (for example, if they forget the name of the movie But he remembered that actor / actress in that movie, he can find the movie by typing the name of the actor). I used jQuery AutoComplete to get the name of the movie or actor's name.

The auto complete parts work fine (i.e., when the user chooses a movie by the title and starts writing the title, then the auto-complete suggestion works, the name of the actor

Problems:

When the user name of the actor is complete, it works fine, besides a dynamic dropdown menu will appear, but the problem is that it is < Strong> Dropdown does not display anything : Does anyone help me figure out what's the problem with this code? Thanks,

"<"> "<"> "; / Option & Lt; option value = "Bye actors"> Bye actor & Lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://code.jquery.com/ui/1.10.1/jquery-ui.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ {Document} .ready (function () {// Create a widget with default data source $ ("# tag"). ({Source: "actorsauto.php", minlength: 2}); $ ("# selecttype" ) .change (function () {// Assign to this new data source: if ($ (this) .val () == "byTitle") $ ("# tags"). Autocomplete ("option", "Source", "movies auto.php"); and if ($ (this) .val () == "by_actor") {$ ("# tag"). (Fully "{{source:" actorsauto.php ", Minlength: 2, select: function (Event, UI) {var selectedVal = $ (this) .val (); // This will be your chosen value from AutoComPeptay // Here AJAX calls. $ (' #movies Dbid '.) Show (); $ .post ("actions.php", {q: selected value, q2: $ ("# selecttype"). Val ()}, function (response) {// in the above response variable Option tags. Just put it in the dropdown. $ ("# MovieImdbId") HTML (response)}}}}}}}}});}); & lt; / script & gt;

and here actions.php:

   Get All (PDO :: FETCH_OBJ); While ($ result as $ line) {$ option = '& lt; Option value = "'. $ Row [' movieImdbId ']." & Gt; '. $ Line ['movie imdbid']. '& Lt; / Option & gt; '; $ Html = $ Option; } $ Html echo; Go out; }? & Gt; Update  

:

I see this:

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -