Just wondering if someone might be able to help with this problem, I have some Javascript code that opens a window in my browser (using window.open etc.) I then write in what i want to appear in the window using 'document.write'. The problem arises when i want to input a PHP variable into the window. I have a little text box that contains (well is supposed to) the PHP variable. I do this with the following code...
<input type ="text" name="first" value="<?php $first ?>" align="top">
The problem is that the Javascript doesn't recognise the PHP and either an error occurs on the page or nothing is printed out in the text box!!Its something to do with how i'm setting the value (value="<?php $first ?>"). Is there a way around this??I tried declaring a javascript variable and letting it equal $first
(ie. var This_Var = "<?php $first ?>"😉
and then letting the value equal this variable (ie. value ="This_Var")
but this again didn't work...anyway, does anyone have any suggestions as to how to get around this, thanks,
Ian