This is a discussion on "External links in. Stored monitored and actioned" within the Classic ASP section. This forum, and the thread "External links in. Stored monitored and actioned are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
External links in. Stored monitored and actioned
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
External links in. Stored monitored and actioned
The website I am working on has arranged deals with several companies to have a link from their website into ours.
Here are the requirments:
Its just fitting all the pieces together . . Any advice would save my balls!>! Im not after code at this stage, just direction Andy |
|
|
|
#2
|
|||
|
|||
|
Using ASP:
1. Get the other site to link to yours with a ref ID like: http://[yourdomain]/[page].asp?ref=4 2. use request.querystring("ref") to get the number 3. use SELECT CASE to decide which logo to show depending on the number sent 4. use request.servervariables("HTTP_REFERER") to get the other webpage they came from 5. place the HTTP_REFERER value in the form as a hidden field |
|
#3
|
||||
|
||||
|
Of course... if you are using HTTP_REFERER then you may not even need to link with a reference number... a straight link would be much better... specially for SEO reasons.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#4
|
|||
|
|||
|
Thanks D3mon that is a great help > U.R.A.Legend!
About the Select Case Would I use code like this:
AK |
|
#5
|
||||
|
||||
|
Hi Andy...
use this code:-
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#6
|
|||
|
|||
|
Cheers Rob
Quote:
In the mean time U-ALL feel free to add any comments cheers AK |
|
#7
|
|||
|
|||
|
Of course, bear in mind that some surfers have applications that block the referrer...
|
|
#8
|
|||
|
|||
|
In which case if I define the 'ref' id numbers with the company names, I could use the 'ref' id on the form, and not bother using the HTTP_REFERER value.
|
|
#9
|
|||
|
|||
|
Sounds fine, so long as you don't need to know exactly which page of the company website the visitor came from.
|
|
#10
|
|||
|
|||
|
I have set up test links using ref numbers linking to the Home page. I have placed the Select Case code mentioned above at the top of the Home page and saved this: home.asp
It works fine to reveal the relevent logos. Only problem is when you click onto another page the ref number goes and so the logo disappears. How can I retain the ref number please? I am placing the same asp code to the top of each page. it has crossed my mind to create and external asp page and link this in, but will this retain the ref number? Do I need to add the 'ref' value to each link somehow? |
|
#11
|
|||
|
|||
|
You could add the ref# to the url of each page in your site, but it would probably be easier to use a session variable to store it.
|
|
#12
|
|||
|
|||
|
Ok i have sorted the Session variable, here is my code on the opening page:
Instead I set Case 0 Img (ref=0) to a tiny square image |
|
#13
|
|||
|
|||
|
The last hurdle. . . I hope!
I can add the 'ref' number/ Session variable to the end of the form email like this:
Estate Agent Lead: 2 But I want the numbers to be referenced to names. I have tried to do this by setting a new variable 'nlogo' but it is wrong, making Errors on Page:
2. If necessary, where do I script if statments. In the body or above the head ? AK |
|
#14
|
|||
|
|||
|
just worked it out. I used Select Case quite easy really,
|
![]() |
| Tags |
| external, links, stored, monitored, actioned |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stored proc | neoandzuco | Databases | 1 | Feb 14th, 2007 14:39 |
| Internal/External links | hart084 | Starting Out | 3 | Jan 29th, 2007 14:10 |
| Email stored in db | tazek0 | Classic ASP | 1 | Mar 3rd, 2006 12:20 |
| Stored proc | kebi | Databases | 0 | Oct 28th, 2005 11:17 |
| ASP and DB2 Stored Procedures | cruza | Classic ASP | 4 | Dec 1st, 2003 17:24 |