42 lines
No EOL
953 B
HTML
42 lines
No EOL
953 B
HTML
<script type="text/javascript">
|
|
{literal}
|
|
function check_file_url(objid)
|
|
{
|
|
var video_link = $('#remote_play_url').val();
|
|
var duration = $('#uploadForm'+objid+' #duration').val();
|
|
|
|
var reg = /^([0-9\:]+)$/i;
|
|
|
|
if(!video_link)
|
|
{
|
|
alert("Please enter valid video link");
|
|
$('#remote_play_url').focus();
|
|
return false;
|
|
}
|
|
if(!duration || !reg.test(duration))
|
|
{
|
|
alert("Please enter valid video duration");
|
|
$('#uploadForm'+objid+' #duration').focus();
|
|
return false;
|
|
}
|
|
|
|
$.post(baseurl+"/actions/embed_form_verifier.php",
|
|
{
|
|
'mode' : 'remote_play',
|
|
'remote_play_url' : $('#remote_play_url').val(),
|
|
duration : $("#uploadForm"+objid+" #duration").val(),
|
|
file_name : file_name,
|
|
thumb_file : $("#uploadForm"+objid+" #thumb_file").val()
|
|
},
|
|
|
|
function (data) {
|
|
if(data.err)
|
|
{
|
|
alert(data.err);
|
|
}else{
|
|
$("#uploadForm"+objid).submit();
|
|
}
|
|
}, "json");}
|
|
|
|
{/literal}
|
|
</script> |