Forum Moderators: DixonJones
When people come in via widgets the logo will be widgets, but how can I get a different image show dependent upon the referring url? Is this even possible (simply...)?
If you need to change the logo based on the current domain name, you can use JavaScript if you like. Just get the current
document.location.href, parse it for the domain name, and set the properties on an image accordingly. A more reliable way is to use server-side scripting. You can retrieve the current domain name in a similar way to JavaScript and set the relevant image src attribute. You can use any server-side technology - PHP, ASP, Perl, even an Apache htaccess file if you were feeling particularly masochistic.
If you want to set the logo based on the referer (i.e. the URL of the page that links to this one) you can use
document.referer instead of document.location.href