2005年10月06日

Mozilla FirefoxではWEB上からローカル画像が参照出来ない!?

お蔭様で謎が解けました。

「画像をアップロードする前にサムネイルを表示させる。」の続きを作ってて思ったのですが、Mozilla系列はWEB上にファイル(HTML等)をアップロードすると、ローカル画像を画像として表示出来ないような気がします。
一応下記のようなソースを書いてみて、ローカルで実行したらMozillaでもリアルタイムでサムネイルが表示されるのですが、WEB上にUPすると動かなくなります。
最初は文字コード関係なのかと思い、色々試行錯誤してみたのですが一切表示されません。
Cドライブにtest.gifという画像を保存して、ソースみてね♪と書いて実験してみたのですがそれでも表示されませんでした。
Mozillaではローカル画像の参照は出来ないのでしょうか。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>リアルタイムサムネイル</title>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<script type="text/javascript">
function imgc(objimg) {
	document.getElementById("s_img").src= "file:///" + objimg.value;
	document.getElementById("s_img").style.display="inline";
}
</script>
<style type="text/css">
#s_img{
	display:none;
	width:150px;/*この値でサムネイルサイズを指定*/
}
</style>
</head>
<body>
<form>
	<input type="file" onChange="imgc(this)" /><br />
	<img src="" id="s_img" /><br />
</form>
</body>
</html>

試行錯誤に5時間近く時間を費やしてしまった・・・。

posted by 高速内弁慶 at 00:56| Comment(10) | TrackBack(1) | 日記 | このブログの読者になる | 更新情報をチェックする
この記事へのコメント
セキュリティの観点からローカルファイルを読み込まないようになっています。
http://www.mozilla-japan.org/releases/mozilla1.8a4/known-issues.html#psm

#悩むよりぐぐれ。
Posted by hoge at 2005年10月06日 13:28
ほんとですね。
これですっきりしました。
ありがとうございました。
Posted by ネット弁慶 at 2005年10月06日 18:38
Firefoxの場合、動かなかったらまずJavaScriptコンソールを確認することをお勧めします。
hogeさんの提示してくださった文書にも書いてありますが、例えばこのページを見ただけでも
「セキュリティエラー: http://codeweb.seesaa.net/article/7762344.html のコンテンツが file:///C:/test.gif を読み込みまたはリンクすることは禁止されています。」
というメッセージが出ています。
Posted by nanto_vi at 2005年10月07日 05:58
先日調べたらFirefoxのまとめサイトにもJavaScriptコンソールについて載ってました。
アドバイスありがとうございます。
また何か変な所みつけたらご指摘いただけたら幸いです。
Posted by ネット弁慶 at 2005年10月10日 18:28
Borrowing money doesn稚 necessary mean getting in debt. If you manage you money wisely you can even make money borrowing money from a bank with credit cards. You get discounts on the things you would have bought anyway, you can get a cash back or simply build your credit history. Just compare the offers at
<a href= http://bueldup-ards.info/immediate-credit-limit-5000.html >5000. visa credit limit immediate</a> <a href= http://bueldup-bcard.info/multiple-approval-instant-credit.html >apply for multiple instant approval credit cards at one time</a> <a href= http://bueldupacrds.info/credit-online-today-card.html >credit card online today</a> <a href= http://biuld-cadrs.info/approved-instant-credit-cards.html >instant approved credit cards usa</a> <a href= http://biuldcaard.info/unsecured-checking-without-account.html >unsecured credit cards with 3000 dollar credit line without having a checking account to get within 3 days</a> <a href= http://biuldacrds.info/approval-instant-credit-people.html >credit with instant approval for people with poor credit</a> <a href= http://bueldup-bcards.info/approval-instant-student.html >instant approval student</a> <a href= http://bueldup-bredit.info/approvals-instant-credit-credit.html >instant approvals on credit cards with no credit</a> <a href= http://biuld-cadit.info/approval-credit-quick-cards.html >quick approval of bp credit cards</a> <a href= http://biuld-cads.info/approval-instant-credit-signer.html >credit card co signer bad credit instant approval</a> <a href= http://biuld-cadr.info/approval-student-instant-online.html >student instant online approval credit cards</a> <a href= http://biuldcadit.info/bankofamerica-creditcard-decisions.html >bankofamerica creditcard decisions</a> <a href= http://biuld-acredit.info/approval-instant-credit-now.html >instant credit approval now</a> <a href= http://biginnerscacrds.info/response-instant-credit-offers.html >instant response to credit card offers</a> <a href= http://biuld-acrd.info/approval-seconds-credit-credit.html >60 seconds approval credit cards open credit</a> <a href= http://biuldcadrs.info/instantly-approve-credit-cards.html >credit cards that approve you instantly</a> <a href= http://instant-credit-credit-cards.bueldupbredit.info/approval-instant-credit-cards4755718.html >credit cards and instant approval</a> <a href= http://biuld-acredit.info/approval-credit-cards-sec4763596.html >60 sec approval credit cards</a> <a href= http://biginners-cads.info/approval-instant-account-credit.html >instant approval buy now pay later with no credit check or bank account</a> <a href= http://website-instant-credit-credit.biuldacards.info/approval-instant-credit-credit4764465.html >instant approval credit cards large line of credit</a>
Posted by Stive Angelo at 2007年07月07日 08:24
Borrowing money doesn稚 necessary mean getting in debt. If you manage you money wisely you can even make money borrowing money from a bank with credit cards. You get discounts on the things you would have bought anyway, you can get a cash back or simply build your credit history. Just compare the offers at
<a href= http://beiggerners-caaard.info/national-platinum-first-omaha.html >first national bank omaha platinum</a> <a href= http://beiggerners-acrds.info/platinum-swiss-visa-get.html >get a swiss platinum visa</a> <a href= http://platinum-world-point-plus.beiggerners-cad.info/platinum-password.html >platinum password</a> <a href= http://beginrs-cadit.info/mastercard-platinum-premier-first.html >platinum first premier mastercard</a> <a href= http://beginrs-cad.info/oklahoma-platimun-bank-card.html >bank of oklahoma platimun card</a> <a href= http://benninersacredit.info/mastercard-login-gold-page.html >gold mastercard login page</a> <a href= http://beginrscadrs.info/platinum-carrol-mbna-john.html >mbna platinum john carrol</a> <a href= http://citgo-citi-platinum.beginrs-cacrds.info/america-points-bank-gold.html >bank of america gold points visa</a> <a href= http://beginrs-cacrds.info/platinum-business-meijer-credit.html >meijer platinum business credit card</a> <a href= http://beginrs-caards.info/platium-master-mbna-plus.html >mbna platium plus master card</a> <a href= http://benniners-caard.info/credit-gold-card-buy.html >buy gold by credit card</a> <a href= http://benniners-bcard.info/platinum-credit-needed-chase.html >chase platinum credit score needed</a> <a href= http://platinum-wired-card-red.beginrs-bcard.info/worldpoints-platinum-credit-mbna.html >mbna worldpoints platinum plus visa credit card</a> <a href= http://rapidapprovecom-platinum-master-card.beginrs-caard.info/cyberspace-platnium-card.html >cyberspace platnium card</a> <a href= http://beiggerners-c5redit.info/platinum-credit-card-how.html >how to get a platinum credit card</a> <a href= http://benninersbredit.info/american-platinum-express-rcredit.html >what is the limit on an american express platinum rcredit card</a> <a href= http://benniners-acrds.info/american-platinum-express-hertz.html >american express platinum hertz</a> <a href= http://beiggerners-cadrs.info/hallmark-gold-card.html >hallmark gold card</a> <a href= http://benninersards.info/classic-credit-apply-visa.html >apply for classic visa credit card</a> <a href= http://beiggernerscadrs.info/preferred-signature-platinum-credit.html >credit card platinum plus vs preferred vs signature</a>
Posted by Stive Angelo at 2007年07月07日 21:22
Borrowing money doesn稚 necessary mean getting in debt. If you manage you money wisely you can even make money borrowing money from a bank with credit cards. You get discounts on the things you would have bought anyway, you can get a cash back or simply build your credit history. Just compare the offers at
<a href= http://delta-amex-platinum.excellent-cedit.info/pulaski-0-apr.html >pulaski 0% apr</a> <a href= http://discovery-classic-card.excellentceditcard.info/triple-advanta.html >triple advanta</a> <a href= http://platinum-capital-master-bank.excellent-cedrit.info/student-apply-amex-blue.html >i am a student can i apply for amex blue card</a> <a href= http://captiol-one-bank.excellentcedrit.info/transfers-discover-interest-lifetime.html >discover card no interest balance transfers lifetime</a> <a href= http://platinum-america-point-gold.excellent-cedrit.info/points-gredit-world-mbna.html >mbna world points gredit card</a> <a href= http://consumer-capitol-reviews-one.excellentcedit.info/amarican-express-card.html >amarican express card</a> <a href= http://cosolidation-credit-mbna-card.excellentcedirt.info/offering-american-express-balance.html >united credit offering an optima card for paying off american express balance</a> <a href= http://platinum-america-credit-score.excellent-ceditcards.info/feedback-america-bank-of.html >feedback bank of america</a> <a href= http://transfer-discover-balance-time.excellentcerdic.info/american-approval-express-rewards.html >american express gold rewards card approval fico</a> <a href= http://american-express-options-milage.excellent-cedirt.info/rewards-mbna-visa-card.html >529 rewards on mbna visa card</a> <a href= http://american-express-options-milage.excellent-cedirt.info/capitol-advance-credit-card.html >capitol one credit card cash advance</a> <a href= http://captiol-one-bank.excellentcedrit.info/discover-awards-bonus-card.html >discover card bonus awards</a> <a href= http://discover-reward-hotel-card.excellentcedit.info/approval-instant-capitol-credit.html >instant approval credit cards capitol one bank one citi</a> <a href= http://american-spending-express-reward.excellent-cerdic.info/pulaski-0-apr.html >pulaski 0% apr</a> <a href= http://capita-credit-cardca-lone.excellent-ceditcard.info/secured-america-credit-cards.html >secured credit cards from bank of america</a> <a href= http://american-express-credit-rating4000412.excellent-ceditcards.info/protection-platinum-capital-rental.html >capital one platinum go miles auto rental protection plan</a> <a href= http://bankofamericacard-mbna.excellent-cedirt.info/american-skymiles-express-receive.html >american express skymiles totals to receive a free flight</a> <a href= http://first-capatol.excellentceditcard.info/amex-diamond-card.html >amex diamond card</a> <a href= http://mbna-bank-lufthansa.excellentceditcard.info/conversion-currency-capital-one.html >capital one no currency conversion fee</a> <a href= http://platinum-capital-master-bank.excellent-cedrit.info/lowering-capital-credit-card.html >capital one credit card lowering your apr</a>
Posted by Stive Angelo at 2007年07月13日 20:44
四角数字0 裲瑯ザ・マーク 瑟 - 耳 <a href= http://beeworker-alex.blogspot.com > 萵 </a>
Posted by yCehEaJjVcE at 2008年01月22日 21:29
Hey, you used to write fantastic, but the last several posts have been kinda boring… I miss your super writings
Posted by Shoe Accessories at 2013年07月31日 11:23
It’s funny ? I have a problem with numbers. The get mixed up pretty much whenever I try to write or say them. I probably raised a few eyebrows when I gave this homily, saying something like “thank God we live in a country where our freedom of religion is protected by the second amendment”. Now granted, there are folks who point out that the second amendment is the bottom line guarantor of all our freedoms… but I wasn’t trying to be provocative, I was being thankful (and, to be honest, quite a bit ironic).
Posted by givenchy bag sale at 2013年08月03日 15:13
コメントを書く
お名前:

メールアドレス:

ホームページアドレス:

コメント:


この記事へのトラックバック

Mozilla
Excerpt: MozillaMozilla(モジラ)はオープンソースで開発されているWebブラウザのひとつ。Web標準とみなされる World Wide Web Consortium|W3C などで決められた勧告や..
Weblog: インターネット
Tracked: 2005-10-18 09:39
×

この広告は90日以上新しい記事の投稿がないブログに表示されております。