IE doesnt send referrer unless a link is clicked!?

They have: 447 posts

Joined: Oct 1999

Hi, Im in the process of putting voice chat on my website, http://www.telcopoint.com/hearme/ which is a replacement for the very popular HearMe voice chat.

To use this service you need to sign up and provide the urls of the entry pages for each room you create. The server uses the referring url to determine which room the user wants. Now if I have 5 different chat rooms I really dont want 5 seperate pages with an enter button, id rather have an index of chat rooms, so ive spent all night trying to do just that. So what i did was register chat room 1 with the url http://www.myurl.com/voicechat_js.html?1 and chat room 2 with the url http://www.myurl.com/voicechat_js.html?2 and so on. then i wrote some code:

<!-- voicechatindex.html -->

&lt;script LANGUAGE="JavaScript"&gt;
  function ForwardToChat(num)
  {  var page = 'voicechat_js.html?' + num;
     win = window.open(page, "AsylumVoiceChat", "height=220,width=520");
     setTimeout('win.close()', 30000);
  }
&lt;/script&gt;

<BR><A HREF="javascript:void(0)" ONCLICK="ForwardToChat(1)">Room 1</A>
<BR><A HREF="javascript:void(0)" ONCLICK="ForwardToChat(2)">Room 2</A>
<BR><A HREF="javascript:void(0)" ONCLICK="ForwardToChat(3)">Room 3</A>
<!-- etc etc etc -->
'

<!-- voicechat_js.html -->

&lt;script LANGUAGE="javascript"&gt;
  document.URL = 'http://www.telcopoint.com/hearme/start_chat.phtml';

&lt;/script&gt;
'

The 'start_chat.phtml' page that is forwarded to doesnt do much but launch the chat client in a new window, and report errors if a connection failed, but once connected its useless and thats why im closing the window after 30 seconds.

Anyways, the above code works beautifully in Netscape. Unfortunately it doesnt work in IE because IE refuses to send a referrer unless a link was actually clicked, and that is turning out to be a major pain in the ass.

So my question is how can i forward a user with a referrer url without them having to physically click a link? I'm sure this has come many times before and im sure theres a workaraound, i just cant find it.

Thanks in advance for any help.

-Rob
http://www.asylumnation.com