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;
}
Problem with Simple Function
Moderator: General Moderators
-
khockenberry
- Forum Newbie
- Posts: 3
- Joined: Tue Aug 02, 2011 3:33 pm
Re: Problem with Simple Function
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?
Is the 4th argument being sent when this function is called?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.