Hi Guys.
Im trying to do the following..
Code:
// Get referring URL
var ref = encodeURIComponent(document.referrer);
function openWindow(id,name)
{
window.open("http://hauntednipple.co.uk?id="+id ,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450px,height=250px");
// End.
}
However I want to add a &refurl= to it..
But if I do the following.
It just stops at the & ( ampersand )
I cant URLencode it etc as it needs to be the "&" symbol in the url bar so the get request works!
Ive tried:
But it fails.. ( just opens the url up to the & char.. )
Code:
// JavaScript Document
var ref = encodeURIComponent(document.referrer);
function openWindow(id,name)
{
// Open IMsupporting window.
window.open("http://hauntednipple.co.uk?id="+ id +"&refurl=" + ref ,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450px,height=250px");
// End.
}
Simply having the &MPERSAND here breaks it.. id +"
&refurl
Thoughts?