Here is my code :-
<script type="text/javascript">
$(document).ready(function () {
$('#table_user_registration').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
$('#table_download_file').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
$('#table_user_activation').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
$("#user_registration").show(); // Default I am setting to this on coming to this page. How can I change this ?
});
var chng = "user_registration";
function audit_options(selected_audit){
$("#"+ chng ).hide();
$("#" + selected_audit ).show();
chng = selected_audit;
}
</script>
<select id="audit_options" onchange="audit_options(this.value);" >
<option value="user_registration">User Registration</option>
<option value="download_file">File Download</option>
<option value="user_activation">User Activation</option>
</select>
<div id="user_registration" style="display: none" >
I have here my Table 1
</div>
<div id="download_file" style="display: none" >
I have here my Table 2
</div>
<div id="user_activation" style="display: none">
I have here my Table 3
</div >
So, if Iam in 2nd value in the dropdown. & I do a refresh page. It comes to the first.