RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 9564 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Nov 2004
Location: Milwaukee, WI
Posts: 62
Reputation: 2ndPlatform is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
2ndPlatform's Avatar
2ndPlatform 2ndPlatform is offline Offline
Junior Poster in Training

Passing a Javascript variable to a PHP using <script> call

  #1  
Sep 3rd, 2005
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 -

<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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Passing a Javascript variable to a PHP using <script> call

  #2  
Sep 4th, 2005
You want to turn a QueryString argument into a PHP variable?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:42 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC