erreur script JS affichage msgBox
bonjour,
qui peut m'aider a trouver l'erreur
ça m'affiche pas le msg box
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../js/jquery2_google_libs.js"/>
</script>
<script type="text/javascript" src="../js/jquery1_google_libs.js"/></script>
<script type="text/javascript">
$(document).ready(function(){
$("div#msgbox").hide();
$("#addcomment").click(function(){
$post('process.php' , {
name:$("#name").val(),
comment:$("#comment").val()
},
function (response){
$("div#msgbox #msg").html("comment added successfully");
$("div#msgbox").slideUp().slidedown("normal");
}
);
return false;
});
$("div#msgbox").click(function(){
$(this).slideUp("normal");
})
});
</script>
<style>
div#msgbox{
background:#CCE5AD;
border-bottom: 2px solid #56B96B;
color: #4a4a4a;
width:100%;
height:30px;
position:absolute;
top:0;
left:0;
cursor:pointer;
}
div#msgbox#msg{line-height:30px; padding-left:10px; }
form#commentform{ margin-top:35px; }
</style>
</head>
<body>
<div id="msgbox"><span id="msg"></span></div>
<form id="commentform">
name:<input type="text" id="name" /><br />
comment:<input type="text" id="comment" />
<input type="submit" value="post comment" id="addcomment" />
</form>
</body>
</html> |