I am building a site at http://forkinthecode.net/budget/2012-2013.php
I have written a script that opens a window with a Google search url in the address bar for the Portfolios, Programs, Agencies and Objectives on each table from the MySQL database.
This script works in Chrome, Safari, IE & Opera but on my machine, when using Mozilla Firefox the variable comes up as "undefined".
I've had a look round the web and find nothing about this.
<script type="text/javascript">//<![CDATA[
function getPortNews()
{
portfolio = document.getElementById('portfolio').innerText;
static_url = ('http://google.com.au/search?q=');
search_url = ( static_url + portfolio );
window.open(search_url);
}
//]]></script>
I am new to JavaScript and please be aware that the site in question and the database behind it is about 75% completed.