Page 1 of 1

send multiple from js to php

Posted: Wed Aug 06, 2008 1:13 pm
by bouncer
hi there,

i can send the val value to php script but can´t send ref value, dont know why ... :(
can anyone explain to me what i'm doing wrong here ?

Code: Select all

 
var val = 150;
var ref = document.data_content.ref.value;
var url = "calcRef.php?ref=" + escape(ref) + "&val=" + escape(val);
 
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
 
thanks in advance

Re: send multiple from js to php

Posted: Thu Aug 07, 2008 3:31 pm
by ghurtado
Does the variable "ref" contain a value?

Re: send multiple from js to php

Posted: Sat Aug 09, 2008 12:27 am
by JAB Creations
I agree with ghurtado, alert the reg variable just before it's executed. It will either tell you the value or (I think offhand) null.