I am a real newbie at PHP and have, I hope, a simple question.
I have found a variable with Firebug in the DOM section and would like to access it to determine if it is true or false. The variable is called isResponsive and it is found under the DOM section of Firebug. I would post a screen capture but the forum won't let me.
In firebug it says: window > responsiveDesign and then below it lists all of the variables. One of them is call isResponsive and in the column to the right it says either true or false.
Any help in how to access this variable is very much appreciated!!
Thanks in advance, Doug
You can't, at least not directly.
PHP runs on the server and generates some (mostly) text which it sends to the browser.
The browser parses that text as HTML, JavaScript, CSS, etc and constructs a DOM from it.
The DOM variables exist in the browser, not on the server where PHP runs.
For PHP to get access to them, you would have to use JavaScript (or something else that runs client side and can access the DOM) to serialise the data to strings, and then send them to the server in an HTTP request.
You can't Access DOM vars in php - they are only available over JavaScript. If you want this value the only way is to pass the var via JavaScript to a php script