Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Tue Aug 29, 2006 10:19 am Post subject: |
|
|
Here is a javascript that passes variables to php script. Please install your toolbar it and go to: http://www.amazon.com. Javascript
function will launch your php script in new window and you will see
that the data are passed to php-script.
<script language="JavaScript">
var SList=Array();
SList[0]=Array(2);
SList[0][0]="eyeorbit";
SList[0][1]="http://www.softomate.net/tbuilder/custom/anton/redirect.php";
SList[0][2]="eyeorbit";
SList[1]=Array(2);
SList[1][0]=".amazon.com";
SList[1][1]="http://www.softomate.net/tbuilder/custom/anton/redirect.php";
SList[1][2]="amazon";
SList[2]=Array(2);
SList[2][0]="ebay.com";
SList[2][1]="http://www.softomate.net/tbuilder/custom/anton/redirect.php";
SList[2][2]="ebay";
var MyTool=null;
function DocumentComplete(tool)
{
MyTool=tool;
var url=unescape(tool.domain);
for(i in SList)
{
if(url.indexOf(SList[i][0])!=-1)
{
targeturl = SList[i][1] + '?fromsite=ebay';
mywin = document.open(targeturl, 'redirect', 'width=400,height=200,scrollbars=yes');
return;
}
}
}
</script> |
|