Thank your for your response mkblade,
However when I use the syntax:
{!! Form::select('id_x', $x) !!}
I keep getting this JS error: "SyntaxError: missing ; before statement" in the 'id_x' of my Select.
Just a thought, try switch all single quotes to doubles and doubles to single?
Didn't work. Keep getting the same error. It is possible to use Blade syntax inside JS?
You can, tho I don't recommend doing it. Using Blades means you are likely doing it in PHP file instead. I think keeping .js files by itself will allow better performance since browser stores cache on client's computer to allow quicker access.
The error "SyntaxError: missing ; before statement" is too general for us to tell what has gone wrong. Please check your chrome debugger for further more information.
Just a reminder, in Javascript, you should avoid using straight newline, that sometimes might cause unexpected problems. (It seems to me you might be on that issue. ) Try use string concatenation instead.
Example:
var html = ""
html += "<table id='tablaRazas'>";
html += "<tr>";
// blah blah blah....
document.getElementById("nombreRaza").innerHTML = html
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community