I have the following JavaScript code: Link
In which the function makewindows does not seem to be working.
It does actual create a window, however the html either contains what is quotes, or if I change it to
child1.document.write(json_encode($row2['ARTICLE_DESC']));
to create a blank html page.
I moved this function to my main JavaScript file to include because I was getting errors before, but now no HTML is presented in the popupwindow. Is this because I am not retrieving article_Desc in thest3.php?
It is indeed a php variable, but it is not being rendered as php because it is not enclosed in
<?php ?>tagsSo, the correct way to do it is:
That way, the php, being a server side language, will render the value in $row2 before the page is rendered, so when the page finally gets rendered, that value will be in the javascript
writefunction…as it’s supposed to be.