[jQuery] Converting objects to strings
Hi All,
I have the following code, which I am trying to pass in 5 variables.
<script type="text/javascript">
$(function(){
$('#DrainStackDiameter').change(function(){
var params = {
TotalApartmentsServed: $('#TotalApartmentsServed'),
TotalWashroomsPerApartment:$('#TotalWashroomsPerApartment'),
TotalPowerPipeUnits: $('#TotalPowerPipeUnits'),
DrainStackLength: $('#DrainStackLength'),
DrainStackDiameter: $('#DrainStackDiameter')
};
$('#RecommendedPowerPipeModel').load('recommend.php',params);
})
.change();
});
</script>
However, the Post in Firebug is giving me the following:
DrainStackDiameter [object Object]
DrainStackLength [object Object]
TotalApartmentsServed [object Object]
TotalPowerPipeUnits [object Object]
TotalWashroomsPerApartment [object Object]
How can I convert to string?
Thanks in advance for any help.
Greg