PDA

View Full Version : Web design question


[RiCE]cancer
July 19th, 2003, 03:27 AM
This is sort of complicated.

Here is what I am trying to do:

1) I have two pictures, a.jpg and b.jpg

2) Depending on what referer the viewer comes from, when they click a certain link I want them to be shown a.jpg or b.jpg. For example, all people coming from Site A will see a.jpg and all people coming from Site B will see b.jpg even though they click the same link.

I've asked around and several people have told me it's impossible because jpgs cannot carry information. Nay, I say. I have seen it done before, I believe it was with some sort of php script.

Any help on this would be greatly appreciated. I will forever be in your debt.

Dingo
July 19th, 2003, 04:51 PM
sounds like an if then type of thing, been 2 yrs since ive done web design and that was with asp. are u just tryin to make a link to goto a picture and thats it?

BuddyLeeX
July 19th, 2003, 05:17 PM
learn php

[RiCE]cancer
July 21st, 2003, 04:17 PM
So let's say there's a link to my page on Yahoo and one on Google. Is this the correct syntax:

<cfif HTTP_REFERER IS "http://www.yahoo.com">
<img src="pic_a.jpg">
<cfelseif HTTP_REFERER IS "http://www.google.com">
<img src="pic_b.jpg">
<cfelse>
</cfif>

And I put this in the body of the htm file that shows the pictures?

Thanks for taking the time to help out, I appreciate it.

DestroyerX
July 23rd, 2003, 12:39 PM
should be able to do it via javascript.