jquery, how to resolve this multiple chain failure
<p>I don't how to resolve this situation. I have this first dropdown menu with ID = PK1. I will force it to some value which goes off with cgi.perl and alters the second drop down menu with ID=#PK1_DEVICE_NAME_SELECTION based on some mysql lookup. </p>

<p>My coding below to force the val('$TEMP{DEVICE1_NAME}') doesn't work!</p>

<p>If I put an alert between the middle these 4 lines, it works. How do I resolve this?</p>

<pre><code>                // FORCING VALUES FOR THE DROP DOWN MENU 1
                \$("#PK1").val('$TEMP{PDK1}');
                \$("#PK1").trigger('change');

                \$("#PK1_DEVICE_NAME_SELECTION").val('$TEMP{DEVICE1_NAME}');
                \$("#PK1_DEVICE_NAME_SELECTION").trigger('change');         
</code></pre>
