im new to codeginiter and its developing. i used dropbox (html select box) when i pressed option there. i need to trigger a alert box.in oder to do that i used following code. But it didnt work on me. and i could find the mistake i've done please help me.
<html lang="en">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Ask Questions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="<?php echo base_url(); ?>css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>css/style.css" rel="stylesheet">
<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.min.js">
// untill select catogory tags are disabled
function activate_match()
{
// var tnmt_id = "hip hure";
alert("tested");
//Get the id of the tournament selected in the list
}
</script>
</head>
<body>
<div class="container">
<p class="help-block">
How to Ask </br>
Is your question about DIY ? </br>
We prefer questions that can be answered, not just discussed.<br>
Provide details. Share your experience. </br>
</p>
<div class="form-group">
<?php
echo form_open('homepage/askquestionview');
echo validation_errors();
?>
</div>
<p> </p>
<div class="form-group">
<select name="cat" id="cat" onchange="activate_match()">
<?php
foreach($catogories as $cat) {
echo'<option value="' . $cat . '">' . $cat . '</option>';
}
?>
</select>
</div>
<div class="form-group">
<p>
Description: <br/>
<textarea name="decription" rows="5" cols="100"> </textarea>
</p>
</div>
<p></p>
<div class="form-group">
Declare new Tags:<br/>
<input type="text" value="" name="tag">
</p>
</div>
</div> <p>
<input type="submit" class="btn btn-success btn-block" value="Post Your Question" id="postQuestion">
</p>
<?php echo form_close(); ?>
</body>
</html>