크롬에서 사진등록이 되게하려면 어떻게 해야하나요.
본문
아래는 사진등록 소스입니다.
익스플로러에서는 등록이 되는데, 크롬에서는 안됩니다.
크롬에서 사진등록이 되게하려면 어떻게 해야하나요.
필수업로드를 삭제하면 크롬에서 됩니다.
그런데 필수업로드가 필요하거든요.
감사합니다.
<?// print_r2($file); ?>
<script language="JavaScript">
var flen = 0;
function add_file(delete_code)
{
var upload_count = <?=(int)$board[bo_upload_count]?>;
if (upload_count && flen >= upload_count)
{
alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
return;
}
var objTbl;
var objRow;
var objCell;
if (document.getElementById)
objTbl = document.getElementById("variableFiles");
else
objTbl = document.all["variableFiles"];
objRow = objTbl.insertRow(objTbl.rows.length);
objCell = objRow.insertCell(0);
upload_required="";//첨가
if (flen ==0) upload_required=" required itemname='사진을 안올렸네요--' ";
if (delete_code == 0) upload_required=" required itemname='첨부파일' ";//첨가-익스플로러에서만작동
objCell.innerHTML = "<input type='file' class='field_pub_01' name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능' "+upload_required+">"; //수정
//원본 objCell.innerHTML = "<input type='file' class=tx size=12 name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능' style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;' ><br>";
if (delete_code)
objCell.innerHTML += delete_code;
else
{
<? if ($is_file_content) { ?>
objCell.innerHTML += "<br><input type='text' size=12 class=tx name='bf_content[]' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.' style='width:100%; color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>";
<? } ?>
;
}
flen++;
}
<?=$file_script; //수정시에 필요한 스크립트?>
function del_file()
{
// file_length 이하로는 필드가 삭제되지 않아야 합니다.
var file_length = <?=(int)$file_length?>;
var objTbl = document.getElementById("variableFiles");
if (objTbl.rows.length - 1 > file_length)
{
objTbl.deleteRow(objTbl.rows.length - 1);
flen--;
}
}
</script>
답변을 작성하시기 전에 로그인 해주세요.