Permabanned
- Joined
- 3 Jul 2008
- Posts
- 3,762
- Location
- My fabulous ship
Hi guys, (forgot to say this is a php/javascript problem)
I have an audio uploading script so users can upload to my amazon s3 bucket. But some users are reporting that they can't upload (it just goes through the process but uploads nothing)
I cant see anything in the php that should cause an issue but in opera I'm finding that I get graphical errors (things not displaying) when using it
does anyone have any javascript software or php software that can help identify a problem when the script fails?
and can anyone see any problems with the following javascript function:
I have an audio uploading script so users can upload to my amazon s3 bucket. But some users are reporting that they can't upload (it just goes through the process but uploads nothing)
I cant see anything in the php that should cause an issue but in opera I'm finding that I get graphical errors (things not displaying) when using it
does anyone have any javascript software or php software that can help identify a problem when the script fails?
and can anyone see any problems with the following javascript function:
PHP:
var initBandTrackSubmit=function()
{
var A=$("addbandtrack");
var C=$("bandtrack");
var D=$("bandtracksubmit");
var B=function()
{
$D.setStyle("bandtracktitle_error","display","none");
$D.setStyle("bandtrackfile_error","display","none");
var E=true;
if($("bandtracktitle").value=="")
{
$D.setStyle("bandtracktitle_error","display","block");
E=false
}
if(($("bandtrackfile").value=="")||($("bandtrackfile").value.lastIndexOf(".mp3")==-1)&&($("bandtrackfile").value.lastIndexOf(".MP3")==-1)&&($("track_id").value==""))
{
$D.setStyle("bandtrackfile_error","display","block");
E=false
}
if(E)
{
var H=
{
success:function(I){},
upload:function(I)
{
if(I.responseText=="success")
{
window.location.reload()
}
else
{
A.innerHTML="";
var J=document.createElement("div");
J.innerHTML=I.responseText;
A.appendChild(J);
initBandTrackSubmit()
}
},
failure:function(I){},
scope:this
};
var G=new Date();
var F="/band/savetrack/"+G.getTime();
$C.setForm(C,true);
$("bandtracksubmit").value="Uploading...";
$C.asyncRequest("POST",F,H)
}
};
$E.addListener(C,"submit",B);
$E.addListener(D,"click",B)
};
$E.onDOMReady(initBandTrackSubmit);
Last edited: