Query on observe form and rjs

I have 3 fields project,type,program .Program should be enable only if
type=1(some predef value)but program values should be based on project
values.I tried to use observe form and rjs.I could not find the
solution plz help me…