<form action="" method="get" onSubmit="return false;">
<input type="text" name="pTitle">
<input type="file" name="pFile" onChange="if(this.value)insertTitle(this.value);">
<input type="submit" value="submit">
</form>
<script language="javascript">
function insertTitle(tValue){
var t1 = tValue.lastIndexOf("//");
var t2 = tValue.lastIndexOf(".");
if(t1 >= 0 && t1 < t2 && t1 < tValue.length){
document.getElementById("pTitle").value = tValue.substring(t1 + 1, t2);
}
}
</script>