Let me see how I describe this....
Now I know that PHP is server side and JS is client side so I would have to somehow pass it to the server and store it there temp. Several answers come to mind (which I dont know how to implant at all):
As for 1, I think it is the best way but I have no idea how to implant something as simple as this. As for 2, Ive tried but it just doesnt work....
Using a cookie (Yes, I know it is a overkill for this) (This is my Lightbox):
//this code is in a JS function inside the Lightbox called saveAndClose document.cookie="cookiename=" + document.getElementById('cookiebox').value;
The HTML of the principal page (the LightBox is in a iframe I believe which is opened from the principal page emulating a popup of sorts) is:
<form name="save" id="save" action="saveAndClose"> <div id="actions"> <input type="text" id="cookiebox" name="cookiebox"/> <input type="submit" id="saveAndClose" name="saveAndClose" value="OK" title="Final"/> </div> </form>
And finally the PHP side of things:
<?php echo $_COOKIE['cookiebox']; ?>
Ive also tried with " " and without ; incase my sintaxis was incorrect.
So that a bit where I am at right now. Basically I want a JS textbox's value to be able to be seen in all of the website, to sum it up and make it easier.