send multiple from js to php

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

send multiple from js to php

Post 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
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: send multiple from js to php

Post by ghurtado »

Does the variable "ref" contain a value?
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: send multiple from js to php

Post 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.
Post Reply