I'm try to make javascript onclick function in php file.the result is make an alert window in my page.
but nothing happen.please help me.
this is my code:
<script type="text/javascript" charset="utf-8">
$('#printdata').click(function() {
datastring = {customer :'val',
person :'val',
address :'val',
phone :'val'};
$.ajax({
type:'POST',
url:'print.php',
data:datastring,
cache:false,
success:function(){
alert('?????');
}
}):
});
});
</script>
datastring val customer,contact,addres,phone is from option value.
what i'm gonna to do is,when i click button it's gonna appear alert that shows data from i choose before in option select.
thanks