Currently I am using this small php script to eval the javascript on a page.
EDIT
Note: this is working, I just want to avoid using php to change part of the javascript
<script type="text/javascript">
<?php
include 'n1.inc';
if (isset($_GET['resultado']))
{
if($_GET["resultado"] != null){
echo $_GET['resultado'];
}
}
include 'n2.inc';
?>
</script>
I know that it is possible to read the querystring with only javascript as it was already demonstrated in the following questions:
How can I get query string values in JavaScript?
I have tried with:
<script src="n1.js"></script>
<script> eval(someQueryStringFunction()); </script>
<script src="n2.js"></script>
it gives an error as the values on the querystring should be in the middle of the function.
If you want to look at the n1.js and n2.js feel free to look at https://github.com/kyllopardiun/MapaColoracao