| | |
Passing a Javascript variable to a PHP using <script> call
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Alright - I'm stumped. I need to get a variable from file1.html to file2.php which is called like this from file1.html:
<script src="scripts/file2.php" type="text/javascript"></script>
In file1.html I have the variable definition to grab the referring URL -
But I need to get 'referringURL' into that PHP file.
Any suggestions?
Thanks.
<script src="scripts/file2.php" type="text/javascript"></script>
In file1.html I have the variable definition to grab the referring URL -
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script> if (document.referrer) { var referringURL = document.referrer; } else { var referringURL = "No referrer." } </script>
But I need to get 'referringURL' into that PHP file.
Any suggestions?
Thanks.
Web Design in Wisconsin : Milwaukee Web Design : Second Platform
![]() |
Similar Threads
- Pass Javascript variable to PHP code (PHP)
- Learning PHP but problem with script (PHP)
- Problem with javascript variable and hidden input (ASP.NET)
- javascript variable in jsp session (JSP)
- How to store javascript variable in jsp session (JSP)
- How Can I Pass A PHP Variable From One .php page to another (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Simple number...
- Next Thread: Can javascript do session variables?
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n






