I'll try that. Thanks.

 

-----Original Message-----
From: morgan lindley [mailto:greyk...@gmail.com] 
Sent: Tuesday, May 21, 2013 3:45 PM
To: cf-talk
Subject: Re: odd (I think) ajax related problem


Use the complete/success/callback of your ajax call to run this code block:
var x = $('#TheBldg').val();  // storage of passed parameter
alert(x);
if ( x.length > 0 ) { $('#bldgID').val(x).prop('selected',true); }

That should ensure the select is available to jquery before attempting to
set it to selected.


On Tue, May 21, 2013 at 2:38 PM, Stephens, Larry V <steph...@iu.edu> wrote:

>
> No error but I don't think it kills the render - just delays it. It works
> okay when I insert what amounts to a delay with the alert().
>
> Only tried it in Firefox so far.
>
>
>
> -----Original Message-----
> From: Maureen [mailto:mamamaur...@gmail.com]
> Sent: Tuesday, May 21, 2013 11:54 AM
> To: cf-talk
> Subject: Re: odd (I think) ajax related problem
>
>
> Are you getting an error?  If so, what is it?  If not, I suspect the
> large number of values for the form select may be killing your page
> render.  Are you having the same results in all browsers?
>
> On Tue, May 21, 2013 at 7:54 AM, Stephens, Larry V <steph...@iu.edu>
> wrote:
> >
> > 1. Load a page
> > 2. Use an ajax call and jQuery to populate a select (verified that the
> value I'm seeking is loaded)
> >
> > 3. Using a passed parameter (stored in a hidden field), set the proper
> option to selected (and this code could be optimized, before anyone
> mentions it)
> >
> > I've done this many times and it works.
> >
> > This time it doesn't. If I put in an alert (originally done to make sure
> the value I want is really there), then it works. Without the alert, it
> doesn't.
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355827
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to