append dropdown menu in form |
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?
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.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Welcome Guest, Not a member yet? Register Sign In |