clipbucket/upload/js/embed_video_mod/functions.js

32 lines
735 B
JavaScript
Raw Normal View History

2009-08-25 12:16:42 +00:00
// JavaScript Document
var embed_check = baseurl+"/actions/embed_form_verifier.php";
function check_embed_code(objId)
{
var theForm = '#embedUploadForm'+objId;
if($(theForm+" #embed_code").val() == "")
2009-08-25 12:16:42 +00:00
alert("Embed code was empty");
else if($(theForm+" #duration").val() == "")
2009-08-25 12:16:42 +00:00
alert("Please enter video duration");
else
{
2009-08-25 12:16:42 +00:00
$.post(embed_check,
{
embed_code : encode64($(theForm+" #embed_code").val()),
duration : $(theForm+" #duration").val(),
2009-08-25 12:16:42 +00:00
file_name : file_name,
thumb_file : $(theForm+" #thumb_file").val(),
verify_embed : 'yes'
2009-08-25 12:16:42 +00:00
},
2009-08-25 12:16:42 +00:00
function (data) {
if(data.err)
{
alert(data.err);
}else{
$(theForm).submit();
2009-08-25 12:16:42 +00:00
}
}, "json");
}
}