![]() |
append dropdown menu in form - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: append dropdown menu in form (/showthread.php?tid=1206) |
append dropdown menu in form - Lykos22 - 02-19-2015 Hi I'd like some help please. I have created a form in CodeIgniter in which I want to save the name of a movie and the actors who play in. My code looks like this: PHP Code: <?php echo form_open().PHP_EOL; ?> So what I'm trying to do basicly is when I click the "Add Actor" button the jquery will append a row in my form where it should have a dropdown menu for choosing the actor, and next to this dropdown an input field for typing the actor's character in the movie. When I click the "Add Actor" button again I will to the same process again to enter the next actor in the movie, etc etc. However the code in the script tag doesn't work as I expected, In fact jquery complains for syntax error. I 'm checking my code and try some changes but no effect. Firebug shows: "SyntaxError: unterminated string literal" How can I make this work properly? RE: append dropdown menu in form - includebeer - 02-22-2015 Check to see if you have movie title or actor name containing single or double quote. That may be why you get "unterminated string literal" error. |