How to load a php file on page load (jQuery provided)
<p>Each article of my site has a unique ID number. When a user clicks to read an article I use a function to get the current's article ID, so the option of the same value in a drop down list to be selected automatically. </p>

<p>For example if I click in the article with ID = 79</p>

<pre><code>&lt;option value="0" &gt;Please Choose&lt;/option&gt;
&lt;option value="97" &lt;?php echo $postid == '97' ? 'selected="selected"' : '';?&gt; &gt;This is 97&lt;/option&gt;
&lt;option value="98" &lt;?php echo $postid == '98' ? 'selected="selected"' : '';?&gt; &gt;This is 98&lt;/option&gt;
</code></pre>

<p>my dropdown list will have "This is 97" option selected.</p>

<p>The problem here is that I use a jQuery script that displays a form upon selection as below:</p>

<pre><code>&lt;script language='JavaScript'&gt;
$(document).ready(function() {
$('#termid').change(function() {
var val = $(this).val();
$('#reservationdetails').empty().addClass('loading').load('../kratisis/forms/' + val + '.php', function(){$('#reservationdetails').removeClass('loading') });
});
});
&lt;/script&gt;

&lt;div id="reservationdetails"&gt;&lt;/div&gt;
</code></pre>

<p>When a user enters to read article 97, the selected option will be "This is 97" but the requested php file (from jQuery) will not be shown unless I choose 98 and then back to 97.</p>

<p>My question is how to handle this? I mean how to show the additional php file when a user enters the article at first but replace it when the dropdown value is changed?</p>

<p>I thought of using <code>&lt;?php include("") ?&gt;</code> but assuming that I am on 97 and click on 98 there will be 2 additional php files.</p>

<p>Thank you for your ideas. </p>
