Code:
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sign Up!</title>
<link rel="stylesheet" href="http://localhost/ci_series/css/style.css" type="text/css" media="screen" />
[removed][removed]
[removed]
$(document).ready(function() {
$('#load').hide();
});
$(function() {
$(".contact_form").click(function() {
$('#load').fadeIn();
var commentContainer = $(this).parent();
var id = $(this).attr("id");
var string = 'id='+ id ;
$.ajax({
type: "POST",
url: "delete.php",
data: string,
cache: false,
success: function(){
commentContainer.slideUp('slow', function() {$(this).remove();});
$('#load').fadeOut();
}
});
return false;
});
});
[removed]
</head>
<body>
<div id = "posts">
Badminton
</div>
<div id = "comments">
I am at dr bombays
</div>
<div id = "comments">
is aj
aj is
</div>
<h1>Contact Us!</h1>
<div id="contact_form">
<form action="http://localhost/ci_series/index.php/contact/submit" method="post">
<input type="hidden" name="entry_id" value="1" />
<input type='text' name='name' value='Name' id='name'/><input type="submit" name="submit" value="Submit" id="submit" /></form> </div>
<div id="main_content">
</div>
<hr >
<div id = "posts">
Badminton
</div>
<div id = "comments">
I am at dr bombays
</div>
<div id = "comments">
is aj
aj is
</div>
<h1>Contact Us!</h1>
<div id="contact_form">
<form action="http://localhost/ci_series/index.php/contact/submit" method="post">
<input type="hidden" name="entry_id" value="1" />
<input type='text' name='name' value='Name' id='2'/><input type="submit" name="submit" value="Submit" id="submit" /></form> </div>
<div id="main_content">
</div>
<hr >
[removed]
$('#submit').click(function() {
var name = $('#name').val();
if (!name || name == 'Name') {
alert('Please enter your name');
return false;
}
var form_data = {
name: $('#name').val(),
email: $('#entry_id').val(),
ajax: '1'
};
$.ajax({
url: "http://localhost/ci_series/index.php/contact/submit",
type: 'POST',
data: form_data,
success: function(msg) {
$('#main_content').html(msg);
}
});
return false;
});
[removed]
</body>
</html>