Pastetool #462

URL: , Paste another

<!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=iso-8859-1" />
	
	<script type="text/javascript" src="js/jqp.js"></script>
	<script>
	$(function() {
		$('#add_video').click(
			function (){
			$('img.username_err, img.video_err, img.url_err, img.thumb_err, img.username_err, img.width_err, img.height_err').hide();
			$.post('ajax.php',
				{
				do: 'add_video',
				video_name: $('input#video').val(),
				video_url: $('input#url').val(),
				video_width: $('input#width').val(),
				video_height: $('input#height').val(),
				thumbnail_url: $('input#thumb').val(),
				username: $('input#username').val()
				}
				, function(data){
					var d = data;
					switch(d.error){
					case 'username':
						$('img.username_err').show();
						break;
					case 'videoname':
						$('img.video_err').show();
						break;
					case 'dimensions':
						$('img.width_err, img.height_err').show();
						break;
					default:
						//	alert(d.error);
						location = 'admin.php';
						alert('admin.php');
						break;
					}
				}
				, "json"
			);
			}
		);
	});
</script>
	
	<style>
	.container{
	width : 600px;
	margin: auto;
	}

	div.err .r{
	color: red;
	}
	div.err{
	padding-left: 85px;
	padding-top: 25px;
	font-weight : bold;
	background-color : #FA697A;
	width : 524px;
	height : 45px;
	border: #FD0000 solid 1px;
	}

	div.addvid{
	margin-left: 250px;
	font-weight : bold;
	}

	input#height, input#width{
	width : 65px;
	}
	input#video, input#url, input#thumb, input#username {
	width : 300px;
	}

	.row{
	margin: 10px;
	}
	.row .v{
	}
	.row .f{
	font-weight : bold;
	float : left;
	margin-right: 10px;
	}
	.row .f{
	text-align:right;
	width : 180px;
	}
	</style>

</head>

<body>
<div class="container">

<div class="err">
	<span class="r">Error:</span> .... etc.. etc...
</div>

<div class="row">
	<div class="f">
		Video name
	</div>
	<div class="v">

		<input type="text" id="video" name="video" value="" />
		<img class="video_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />
	</div>
</div>
<div style="clear:both;"></div>

<div class="row">
	<div class="f">
		URL to video
	</div>
	<div class="v">

		<input type="text" id="url" name="url" value="" />
		<img class="url_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />
	</div>
</div>
<div style="clear:both;"></div>

<div class="row">
	<div class="f">
		URL to thumbnail
	</div>
	<div class="v">

		<input type="text" id="thumb" name="thumb" value="" />
		<img class="thumb_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />
	</div>
</div>
<div class="row">
	<div class="f">
		Username
	</div>
	<div class="v">
		<input type="text" id="username" name="username" value="" />

		<img class="username_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />
	</div>
</div>
<div class="row">
	<div class="f">
		Width
	</div>
	<div class="v">
		<input type="text" id="width" name="width" value="" />
		<img class="width_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />

	</div>
</div>
<div class="row">
	<div class="f">
		Height
	</div>
	<div class="v">
		<input type="text" id="height" name="height" value="" />
		<img class="height_err" src="img/exclamation.png" width="16" height="16" alt="" title="" style="display : none;" />
	</div>

</div>
<div style="clear:both;"></div>

	<div class="addvid">
		<a href="#" id="add_video">Add Video</a>
	</div>

</div>


</body>
</html>

Download code


This code was pasted on March 3, 2010




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter