Using external file jquery for the same time triggering
<p>I got the problem for triggering variable, with jquery with the same module and separated.
The scripting like these below:</p>

<pre><code>&lt;script src="jquery.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function(){

$('#but1').click(function(){
var dat1=$('#name').val();
alert(dat1);
});
});

&lt;/script&gt;

&lt;body&gt;
&lt;input type="text" id="name" /&gt;
&lt;button id="but1"&gt;Process&lt;/button&gt;
&lt;/body&gt;
</code></pre>

<p>With the same module I can got variable with the same time,if I pressed the button.
But the problem appeared when the script of jquery separated with external file (.js),because I must refresh the page for getting The newest varible value if pressed the button.
This script below for external file js:</p>

<pre><code>&lt;script src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="testjava.js"&gt;&lt;/script&gt;
</code></pre>

<p>this for testjava.js:</p>

<pre><code>$(function(){

var dat1=$('#nama').val();

$('#but1').live('click',function(){

alert(dat1);

});

});
</code></pre>

<p>Pls show me the way so the variable can be fired in the same time (without refresh page) if I press button with external js? many thx.</p>
