JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 30th, 2001, 02:35 AM
Neole Neole is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 5 Neole User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Passing variable to javascript sourced php3

I'm using this line in my pages (on freehosts, so no php or includes allowed) -

<script language="JScript" src="http://www.mydomain.com/function.php3"></script>


I need to pass the php the page referrer information. I used javascript to find the referrer and have given it the variable "ref" . How can I pass on ref to the php in this format -

<script language="JScript" src="http://www.mydomain.com/function.php3?referrer=ref"></script>

- where ref should be replaced by the variable ref.

Reply With Quote
  #2  
Old May 30th, 2001, 05:11 AM
R0bb02001 R0bb02001 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Brisbane, Australia
Posts: 32 R0bb02001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 5 sec
Reputation Power: 13
This is a javascript question, but I will give you an answer anyway, since I'm such a nice guy

Basically, somewhere else in your page (where you make ref equal to the referrer) you would document.write the tag you have.

Example,

Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
ref = (page referrer);
document.write("<script language=\"JavaScript\" src=\"http://www.mydomain.com/function.php3?referrer=" + ref + "\"></script>");
//-->
</SCRIPT>


Hope this helped.

Regards,
Robbo

Reply With Quote
  #3  
Old May 31st, 2001, 06:11 PM
Neole Neole is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 5 Neole User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This didnt work for me, maybe because thejavascript that I get back has another document.write function in it?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Passing variable to javascript sourced php3

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap