Stort problem med at sende information vidre...
Hejsa... Jeg har et virkelig stort problem... Jeg er ved at lave dankort betalling på en side.. Men mit problem er at jeg skal ha sendt noget information vidre til en side...Den side hvor det skal sendes til står der:
<input type=hidden name=belob value=\"\">
-----------------
Mit script kommer her under... Det er vil der i hvor der skal laves noget om ???
<SCRIPT LANGUAGE=\'JAVASCRIPT\'>
currencyCode = new Array(1); currencyName = new Array(1); currencyDecimals = new Array(1); currencyPre = new Array(1); currencyMiddle = new Array(1); currencyPost = new Array(1);
currencyCode[1]=\'DKK\'; currencyName[1]=\'Denmark Kroner\'; currencyDecimals[1]=\'2\'; currencyPre[1]=\'\'; currencyMiddle[1]=\',\'; currencyPost[1]=\'\';
today=new Date();
today.setTime(today.getTime() + (3600000));
today=today.toGMTString();
currentdate=new Date();
currentdate=currentdate.toLocaleString();
ilist=top.name;
tstring=ilist;
nstring=\'\';
for (var i=0; i <= tstring.length; i++) {
nchar=tstring.charAt(i);
if (nchar==\'_\') { nchar=\'%\'; }
nstring=nstring+nchar;
}
ilist=nstring;
ilist=unescape(ilist);
tstring=ilist;
nstring=\'\';
for (var i=0; i <= tstring.length; i++) {
nchar=tstring.charAt(i);
if (i<tstring.length-1) {
nchar2=nchar+tstring.charAt(i+1)+tstring.charAt(i+2);
if (nchar2==\'!&1\') { nchar=\'*\'; i++;i++;}
if (nchar2==\'!&2\') { nchar=\'+\'; i++;i++; }
if (nchar2==\'!&3\') { nchar=\'@\'; i++;i++; }
if (nchar2==\'!&4\') { nchar=\'.\'; i++;i++; }
if (nchar2==\'!&5\') { nchar=\'/\'; i++;i++; }
if (nchar2==\'!&6\') { nchar=\'-\'; i++;i++; }
if (nchar2==\'!-1\') { nchar=\'*\'; i++;i++;}
if (nchar2==\'!-2\') { nchar=\'+\'; i++;i++; }
if (nchar2==\'!-3\') { nchar=\'@\'; i++;i++; }
if (nchar2==\'!-4\') { nchar=\'.\'; i++;i++; }
if (nchar2==\'!-5\') { nchar=\'/\'; i++;i++; }
if (nchar2==\'!-6\') { nchar=\'-\'; i++;i++; }
}
nstring=nstring+nchar;
}
ilist=nstring;
thearray=ilist.split(\'^\');
document.cookie=\'trytekCode=\'+thearray[0]+\'; expires=\'+today;
document.cookie=\'trytekName=\'+thearray[1]+\'; expires=\'+today;
document.cookie=\'trytekWeight=\'+thearray[2]+\'; expires=\'+today;
document.cookie=\'trytekTaxable=\'+thearray[3]+\'; expires=\'+today;
document.cookie=\'trytekPrice=\'+thearray[4]+\'; expires=\'+today;
document.cookie=\'trytekExtraFields=\'+thearray[5]+\'; expires=\'+today;
document.cookie=\'trytekAdvanced=\'+thearray[6]+\'; expires=\'+today;
document.cookie=\'trytekQuantity=\'+thearray[7]+\'; expires=\'+today;
document.cookie=\'TheCurrency=\'+thearray[8]+\'; expires=\'+today;
document.cookie=\'JShopReferrer=\'+thearray[9]+\'; expires=\'+today;
numFields=0;
function addFiller(curnum) {
newnum=parseInt(curnum);
if (newnum<10) return \'00\'+newnum;
if (newnum<100) return \'0\'+newnum;
return newnum;
}
function nextField() {
numFields++;
return addFiller(numFields)+\'-\';
}
function showPrice(pricestring) {
index = document.cookie.indexOf(\'TheCurrency\');
countbegin=(document.cookie.indexOf(\'=\',index)+1);
countend=document.cookie.indexOf(\';\',index);
if(countend==-1) { countend=document.cookie.length; }
theCurrency=document.cookie.substring(countbegin,countend);
thisitem=0;
itemstart=0;
theprice=0;
for (var i=0; i<pricestring.length; i++) {
if (pricestring.substring(i,i+1)==\'~\') {
thisitem++;
if (thisitem==eval(theCurrency)) {
theprice=pricestring.substring(itemstart,i);
}
itemstart=i+1;
}
}
return presentValue(theprice,currencyDecimals[theCurrency],currencyPre[theCurrency],currencyMiddle[theCurrency],currencyPost[theCurrency]);
}
function showPriceSingle(pricestring) {
index = document.cookie.indexOf(\'TheCurrency\');
countbegin=(document.cookie.indexOf(\'=\',index)+1);
countend=document.cookie.indexOf(\';\',index);
if(countend==-1) { countend=document.cookie.length; }
theCurrency=document.cookie.substring(countbegin,countend);
return presentValue(pricestring,currencyDecimals[theCurrency],currencyPre[theCurrency],currencyMiddle[theCurrency],currencyPost[theCurrency]);
}
function showPricePlain(pricestring) {
index = document.cookie.indexOf(\'TheCurrency\');
countbegin=(document.cookie.indexOf(\'=\',index)+1);
countend=document.cookie.indexOf(\';\',index);
if(countend==-1) { countend=document.cookie.length; }
theCurrency=document.cookie.substring(countbegin,countend);
return presentValue(pricestring,currencyDecimals[theCurrency],\'\',currencyMiddle[theCurrency],\'\');
}
function getPrice(pricestring) {
index = document.cookie.indexOf(\'TheCurrency\');
countbegin=(document.cookie.indexOf(\'=\',index)+1);
countend=document.cookie.indexOf(\';\',index);
if(countend==-1) { countend=document.cookie.length; }
theCurrency=document.cookie.substring(countbegin,countend);
thisitem=0;
itemstart=0;
theprice=0;
for (var i=0; i<pricestring.length; i++) {
if (pricestring.substring(i,i+1)==\'~\') {
thisitem++;
if (thisitem==eval(theCurrency)) {
theprice=pricestring.substring(itemstart,i);
}
itemstart=i+1;
}
}
return theprice;
}
function presentValue(value,dp,pt,mt,at) {
if(value<=0.9999) {
newPounds=\'0\';
} else {
newPounds=parseInt(value);
}
dec=\'1\';
for (var i=1; i<=dp;i++) {
dec=dec+\'0\';
}
if (value>0) {
newPence=Math.round((eval(value)+.000008 - newPounds)*(eval(dec)));
} else {
newPence=0;
}
compstring=\'9\';
for (var i=1; i <=dp-1;i++) {
if (eval(newPence) <= eval(compstring)) newPence=\'0\'+newPence;
compstring=compstring+\'9\';
}
if (dp>0) {
if (newPence==eval(dec)) { newPounds++; newPence=0; }
newString=pt+newPounds+mt+newPence+at;
} else {
newString=pt+newPounds+at;
}
return (newString);
}
function retrieveCookie(thecookie,thenumber,theadditional) {
index = document.cookie.indexOf(thecookie);
countbegin=(document.cookie.indexOf(\'=\',index)+1);
countend=document.cookie.indexOf(\';\',index);
if(countend==-1) { countend=document.cookie.length; }
fulllist=document.cookie.substring(countbegin,countend);
if (thenumber==0) { return fulllist; }
thisitem=0;
newcookie=\'\';
itemstart=0;
for(var i=0; i<fulllist.length;i++) {
if (fulllist.substring(i,i+1)==\'|\') {
thisitem++;
itemvalue=fulllist.substring(itemstart,i);
if (thisitem==thenumber) {
if (theadditional==0) {
return itemvalue;
} else {
itemstarttwo=0;
thisitemtwo=0;
for (var j=0; j<itemvalue.length; j++) {
if (itemvalue.substring(j,j+1)==\'~\') {
thisitemtwo++;
itemvaluetwo=itemvalue.substring(itemstarttwo,j);
if (thisitemtwo==theadditional) {
return itemvaluetwo;
}
itemstarttwo=j+1;
}
}
}
}
itemstart=i+1;
}
}
return \'\';
}
function addToCookie(thecookie,thevalue) {
fulllist=retrieveCookie(thecookie,0,0);
if (fulllist==\'.\') { fulllist=\'\'; }
fulllist=fulllist+thevalue+\'|\';
document.cookie=thecookie+\'=\'+fulllist+\'; expires=\'+today;
}
function removeFromCookie(thecookie,thenumber) {
fulllist=retrieveCookie(thecookie,0,0);
thisitem=0;
newcookie=\'\';
itemstart=0;
for(var i=0; i<fulllist.length;i++) {
if (fulllist.substring(i,i+1)==\'|\') {
thisitem++;
itemvalue=fulllist.substring(itemstart,i);
if (thisitem!=thenumber) {
newcookie=newcookie+itemvalue+\'|\';
}
itemstart=i+1;
}
}
if (newcookie==\'\') { newcookie=\'.\'; }
document.cookie=thecookie+\'=\'+newcookie+\'; expires=\'+today;
}
function changeCookieValue(thecookie,thenumber,thevalue) {
fulllist=retrieveCookie(thecookie,0,0);
thisitem=0;
newcookie=\'\';
itemstart=0;
for(var i=0; i<fulllist.length;i++) {
if (fulllist.substring(i,i+1)==\'|\') {
thisitem++;
itemvalue=fulllist.substring(itemstart,i);
if (thisitem==thenumber) {
itemvalue=thevalue;
}
newcookie=newcookie+itemvalue+\'|\';
itemstart=i+1;
}
}
document.cookie=thecookie+\'=\'+newcookie+\'; expires=\'+today;
}
function retrieveCookieCount(thecookie) {
fulllist=retrieveCookie(thecookie,0,0);
thisitem=0; newcookie=\'\'; itemstart=0;
for(var i=0; i<fulllist.length;i++) {
if (fulllist.substring(i,i+1)==\'|\') {
thisitem++;
itemstart=i+1;
}
}
return thisitem;
}
function showCurrency() { index = document.cookie.indexOf(\'TheCurrency\'); countbegin=(document.cookie.indexOf(\'=\',index)+1); countend=document.cookie.indexOf(\';\',index); if(countend==-1) { countend=document.cookie.length; } theCurrency=document.cookie.substring(countbegin,countend); document.basketform.selectcurrency.selectedIndex=theCurrency-1;}function getAdvanced(adv,qty) {
newAdv=\'\';advlist=0;applicable=true;advnewprice=\'\';
for (var j=0;j<=adv.length;j++) {
if (adv.substring(j,j+1) == \'{\') {
thisadv=1;
advstart=j+1;
} else if (adv.substring(j,j+1) == \'}\') {
advend=j;
advPrice=adv.substring(advstart,advend);
advlist++; applicable=true;
if (applicable==true) {
if (advFrom > 0 && advFrom > eval(qty)) applicable=false;
if (advTo > 0 && advTo < eval(qty)) applicable=false;
if (applicable==true) advnewprice=advPrice;
}
} else if (adv.substring(j,j+1)==\'!\') {
if (thisadv==1) field0 = adv.substring(advstart, j);
if (thisadv== 2) advFrom=adv.substring(advstart,j);
if (thisadv== 3) advTo=adv.substring(advstart,j);
thisadv++;advstart=j+1;
}
}
return advnewprice;
}
alltheitems=0;taxfield=\'\';singletax=\'\';singleshipping=\'\';taxfield2=\'\';shippingfile=\'\';primaryfield=\'\';secondaryfield=\'\';singlefield=\'\';
function showBasket() {
totprice=0;shippingtotal=0;taxtotalone=0;taxtotaltwo=0;ordertotal=0;taxablestandard=0;taxablesecond=0;taxable=0;totalforshipping=0;
document.writeln(\'<table bordercolor=000000 border=1 width=75% cellpadding=3 cellspacing=0>\');
document.writeln(\'<tr>\');
document.writeln(\"<td bgcolor=FFCC00><font face=\'Arial,Helvetica\' size=2 color=000000><b>Type</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00><font face=\'Arial,Helvetica\' size=2 color=000000><b>Navn</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00 align=right><font face=\'Arial,Helvetica\' size=2 color=000000><b>Antal</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00 align=right><font face=\'Arial,Helvetica\' size=2 color=000000><b>Pris / Stk.</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00 align=right><font face=\'Arial,Helvetica\' size=2 color=000000><b>Total beløb</b></font></td>\");
document.writeln(\"</tr>\");
for (var i=1;i<=retrieveCookieCount(\'trytekCode\');i++) {
theCode=retrieveCookie(\'trytekCode\',i,0);
theName=retrieveCookie(\'trytekName\',i,0);
theWeight=retrieveCookie(\'trytekWeight\',i,0);
theTaxable=retrieveCookie(\'trytekTaxable\',i,0);
thePrice=retrieveCookie(\'trytekPrice\',i,0);
theField1=retrieveCookie(\'trytekExtraFields\',i,1);
theAP=retrieveCookie(\'trytekAdvanced\',i,0);
theQuantity=retrieveCookie(\'trytekQuantity\',i,0);
if (theAP!=\'none\') {
tempprice=getAdvanced(theAP,theQuantity);
if (tempprice>\'\') { thePrice=tempprice; }
}
itemtotal=eval(theQuantity)*eval(getPrice(thePrice));
totprice=totprice+itemtotal;
if (theTaxable==0) taxablestandard=taxablestandard+itemtotal;
if (theTaxable==1) taxablesecond=taxablesecond+itemtotal;
totalforshipping=totalforshipping+eval(theQuantity);
document.writeln(\"<td bgcolor=FF6600><font face=\'Arial,Helvetica\' size=2 color=000000>\"+theCode+\"</font></td>\");
document.writeln(\"<td bgcolor=FF6600><font face=\'Arial,Helvetica\' size=2 color=000000>\"+theName+\"</font></td>\");
document.writeln(\"<td bgcolor=FF6600 align=right><font face=\'Arial,Helvetica\' size=2 color=000000>\"+theQuantity+\"</font></td>\");
document.writeln(\"<td bgcolor=FF6600 align=right><font face=\'Arial,Helvetica\' size=2 color=000000>\"+showPrice(thePrice)+\"</font></td>\");
document.writeln(\"<td bgcolor=FF6600 align=right><font face=\'Arial,Helvetica\' size=2 color=000000>\"+showPriceSingle(itemtotal)+\"</font><input type=hidden name=\'Name\"+i+\"\' value=\'\"+theCode+\", \"+theName+\", ex: \"+theField1+\"\'><input type=hidden name=\'Quantity\"+i+\"\' value=\'\"+theQuantity+\"\'><input type=hidden name=\'pris\"+i+\"\' value=\'\"+getPrice(thePrice)+\"\'><input type=hidden name=\'belob value\"+i+\"\' value=\'\"+showPricePlain(itemtotal)+\"\'><input type=hidden name=\'Valuta\"+i+\"\' value=\'\"+currencyCode[thearray[8]]+\"\'></td>\");
document.writeln(\"</tr>\");
}
alltheitems=i-1;
document.writeln(\"<tr>\");
document.writeln(\"<td bgcolor=FFCC00 colspan=4><font face=\'Arial,Helvetica\' size=2 color=000000><b>Total beløb</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00 align=right><font face=\'Arial,Helvetica\' size=2 color=000000><b>\"+showPriceSingle(totprice)+\"</b></font><input type=hidden name=\'GoodsTotal\' value=\'\"+totprice+\"\'></td>\");
document.writeln(\"</tr>\");
document.writeln(\"<tr>\");
document.writeln(\"<td bgcolor=FFCC00 colspan=4><font face=\'Arial,Helvetica\' size=2 color=000000><b>I alt</b></font></td>\");
document.writeln(\"<td bgcolor=FFCC00 align=right><font face=\'Arial,Helvetica\' size=2 color=000000><b><input type=text size=8 name=showtotal value=\"+showPriceSingle(totprice)+\"></b></font><input type=hidden name=\'belob value\' value=\'\"+totprice+\"\'></td>\");
document.writeln(\"</tr>\");
document.writeln(\"</table>\");
}
function flipImage(imgname,imgsrc) {
document.images[imgname].src=imgsrc;
}
function checkPurchaseFields() {
if (document.basketform.Navn.value==\'\') {
rc=alert(\'Mangler at udfylde Navn\');
return false;
}
if (document.basketform.gade.value==\'\') {
rc=alert(\'Mangler at udfylde Gade / Nr.\');
return false;
}
if (document.basketform.by.value==\'\') {
rc=alert(\'Mangler at udfylde Post nr. / By\');
return false;
}
if (document.basketform.email.value==\'\') {
rc=alert(\'Mangler at udfylde E-Mail\');
return false;
}
if (document.basketform.telefon.value==\'\') {
rc=alert(\'Mangler at udfylde Telefon\');
return false;
}
return true;
}
function goSubmit() { if (checkPurchaseFields()) { document.basketform.submit(); }}</SCRIPT>
<BODY>
<center>
<h2>Kassen...</h2>
<FORM NAME=\'basketform\' ACTION=\'http://mail.viborgnet.dk/cgi-bin/FormMail.cgi\' METHOD=POST onSubmit=\'return checkPurchaseFields();\'>
<INPUT TYPE=HIDDEN NAME=\'subject\' VALUE=\'Bestilling\'>
<INPUT TYPE=HIDDEN NAME=\'redirect\' VALUE=\'https://betaling.viborgnet.dk/new-testform.php3\'>
<INPUT TYPE=HIDDEN NAME=\'recipient\' VALUE=\'info@web-dezigns.dk\'>
<SCRIPT LANGUAGE=\'JavaScript\'>document.writeln(\"<INPUT TYPE=HIDDEN NAME=\'Currency\' VALUE=\'\"+currencyCode[thearray[8]]+\"\'>\");</SCRIPT>
<SCRIPT LANGUAGE=\'JavaScript\'>document.writeln(\"<INPUT TYPE=HIDDEN NAME=\'CurrencyName\' VALUE=\'\"+currencyName[thearray[8]]+\"\'>\");</SCRIPT>
<SCRIPT LANGUAGE=\'JavaScript\'>showBasket();</SCRIPT>
---------
Please hjælp....
