Page 1 of 1

Problem with Simple Function

Posted: Wed Aug 03, 2011 10:30 am
by khockenberry
I'm using this function to set read only input boxes to the passed values, this code works perfect[Note these variables are being read from a DB using Php in a select option form].
The problem I'm having is only numbers being passed from the DB will display,

I try adding business[red code] and try to set the value of it but when this is done it makes the whole function not work.


function setProjectNum(num,alloHrs,tele, bus){
Pnum=num;
allocatedHrs=alloHrs;
Phone=tele;
Business=bus;
document.getElementById('projectNum').value=Pnum;
document.getElementById('allocatedHrs').value=allocatedHrs;
document.getElementById('phoneNum').value=Phone;
document.getElementById('business').value=Business;

}

Re: Problem with Simple Function

Posted: Wed Aug 03, 2011 4:21 pm
by pickle
Are you getting errors? Run this function with Firebug running (or Chrome/Safari's Developer's tools).

Is the 4th argument being sent when this function is called?