just a simple question, can we assigned codeigniter open_form() to javascript var?
i have a code like this:
var openForm = '<?php echo form_open("controller/some_function",
array('class' => 'class_name', 'enctype' => 'multipart/form-data'));?>';
but when i run it, i got error in my console saying:
Uncaught SyntaxError: Invalid or unexpected token
but, when i try this:
var closeForm = '<?php echo form_close(); ?>';
it didn't show any error.
though i guess it's not about syntax error, i still have no idea what is wrong and what happens. can anyone explain?