----- Original Message ----- 
From: "RA Jones" <[EMAIL PROTECTED]>
To: "List - CGI-Application" <[email protected]>
Cc: "Jonathan Mangin" <[EMAIL PROTECTED]>
Sent: Thursday, November 09, 2006 5:13 PM
Subject: Re: [cgiapp] Test 2 - is this thing on?


> Jonathan Mangin wrote:
> >> First drop-down: <select onBlur="populate_clinicians(['src_id'], 
> >> ['clin_list']); return true;" name="src_id" id="src_id"> <option 
> >> value="">&nbsp;</option> .. </select>
> > 
> > Looks like all the examples of using CGI::Ajax I've seen. Is 
> > populate_clinicians doing a db lookup?  If so, isn't that where $html
> >  should be defined?  Is it a huge list?
> 
> Yes populate_clinicians selects a sub-set from a national list of over
> 34,000 - far too many to load at first go. It returns a pre-formatted
> drop-down menu containing all the clinicians which 'belong' to the
> selected src_id (ie hospital) - a couple of hundred or so.
> 
> > I would use onChange=... since your sub will be invoked that much 
> > sooner (milliseconds).
> 
> The reason I do that is a little complex, but in summary there are two
> ways to arrive at the page containing the sources & clinicians drop-down
> menus - one where the source/src_id combination is pre-selected, and the 
> other where it is not. In the first scenario the user probably would not 
> change the pre-selected source so onBlur would not be invoked, whereas 
> onChange is always invoked since I force the cursor onto that field on 
> page load. Hope that a bit clearer than mud!
> 
> >> Dependant drop-down generated by: <div id="clin_list"></div>
> > 
> > In my template I have a placeholder, with instructions.
> > 
> > <div id=doctors> <select name=doctor_id size=1 disabled> 
> > <option>Select a Practice </select> </div>
> 
> So you're doing something similar? How does this work if the field is
> disabled and so inaccessible?
> -- 
> Richard Jones
> Leeds, UK
> mailto:[EMAIL PROTECTED]


'doctors' is the <div> that gets replaced with a correctly-
populated drop-down after the user selects a Practice (company?)
from another <select>.

--Jon




---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to