<table align="left" width="100%" >
<tr>
<td>
<div class="form">
<table width="500" cellpadding="5" cellspacing="5">
<tr>
<td>
<form name="frmlist" id="frmlist" action="check.php" method="POST" enctype="multipart/form-data">
<table width="802" style="border-collapse: collapse;">
<tr>
<td width="20">1</td>
<td width="120"><span class="form_title">Brand Name<span style="color: rgb(255, 0, 0); padding-left: 2px;">*</span></span></td>
<td><select name="brand" id="Category_type" onchange="get_states();"><?php
if($count>0){
while($row=mysql_fetch_assoc($q)){
echo '<option value='.$row['uniq_id'].'>'.$row['brand_name'].'</option>';
}}?>
</select></td>
</tr>
<tr height="10"></tr>
<tr>
<td colspan="3" width="1000"><textarea cols="1000" id="editor1" name="editor1" rows="1000">
<div id="get_state"></div></textarea>
</td>
</tr>
<script>
var editor;
function createEditor( languageCode ) {
if ( editor )
editor.destroy();
CKEDITOR.replace( 'editor1', {
extraPlugins: 'stylesheetparser',contentsCss: 'css/main.css',stylesSet: []
});
}
// At page startup, load the default language:
createEditor( '' );
</script>
<div>
</table>
<input type="submit" name="partner_1" value="SUBMIT" class="sub" ></div>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
function get_states() { // Call to ajax function
var Category_type = $('#Category_type').val();
console.log(Category_type);
var dataString = "Category_type="+Category_type;
//console.log(Category_type);
$.ajax({
type: "POST",
url: "ajax_partner.php", // Name of the php files
data: dataString,
success: function(html)
{
$("#get_state").html(html);
}
});
}
</script>
</body>
</html>
first there is a dropdown which brings the value from the database , When user click on any value , It send a ajax request through which I get the value and get the html from it place it between the div which has id get_state I am using a check editor so that the user can see and edit his work i have checked it on my console and its bringing the data so please anybody can help me