I have to run php script from java script (html) I am doing it like : <HTML> <BODY> <script src="http://testsite.com/countimpr.php" type="text/javascript"></script> </BODY> and its working fine, but I need to send to php full url of the current page, because php script can not get this information due to running from java, what is the best way to do that ? Like I was thinking to send it wirh variable like countimpr.php?url= but I dont know how to set java variable in this case
you could try something like this: <html> <body> <script type='text/javascript'> document.write("<script src='http://testsite.com/countimpr.php?url="+document.location+"' type='text/javascript'></script>"); </script> </body> </html> Code (markup):