I need get content html from report view, but someone elements is making by javascript how to populate div.
On laravel i using view(‘report’)->render(); but return only empty div:
<div id="report"></div>
The render not execute my javascript functions, exists one solution for this?
I need get content html with DOM elements complete render via javascript function
2
Answers
JavaScript is client sided, it cannot execute unless you open it in browser. So, there is no possible way to retrieve data with render() that is populated by JavaScript
I use a workaround.
Say you want to use a row to populate some ‘righteous’ table. You can build a fake table as a template .
It will feed you with its row:
templates.mytamplate.blade.php
Now back to the main blade:
that $(‘#backg’) hides table when initialy the mock stuff may flicker instantly in some browsers.