I have a PHP File with something like this:
<script type="text/javascript">
var page = '1';
</script>
<select class='search' name="type" ID="type">
<option value='%'>All Types</option>
.....
</select>
I know how to retrieve the value of the type with JQuery.
Is there a way (besides a hidden field) to retrieve the value of the JavaScript variable page?
I have tried this but keep getting undefined:
var page = $("#" + this.page).val();
Your variable
pageis global throughout the scope of your document. You can access simply byas long as it was set in the document before this script was ran.