I know, I know..it's not always accurate, but I have a problem.

I have a script that I link to from my pages (a refer a friend script). At first I used a normal html link to the script and the HTTP_REFERER worked. I need it to work because it depends on the page they are on that gets advertised. If they were on cats.html and pressed the link, it would use the www.page.com/cats.html in the email. This works PERFECTLY, it works.

The problem lies when I make a new custom javascript window from the link.

<A HREF="javascript:window.open('raf.pl', '','toolbar=no width=400 height=500 scrolling=yes'); void('');">
Now, when it loads raf.pl (Refer a Friend), it doesn't record the referer.

Can someone give me any ideas on how to get this to work? I was thinking about using a form with a hidden field, but I don't want to use a form button. Is there a way to make a form link instead and have it open in a presized window?

This isn't a strictly JS question or an HTML question, but a combination of those and perl, so don't downvote or delete this post. I really need help on this.


In reply to http referer by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.