haxmurderface
New Member
I have stylized My File input using :\[code\]<html><head><style>#yourBtn{ position: relative; top: 150px; font-family: calibri; width: 150px; padding: 10px; border-radius: 5px; border: 1px dashed #ddeeff; text-align: center; background-color: #ffffff; cursorointer; color:#333333;}</style><script type="text/javascript"> function getFile(){document.getElementById("upfile").click(); } function sub(obj){ document.getElementById("yourBtn").innerHTML = "Uploading Please Wait..."; document.myForm.submit(); event.preventDefault(); }</script></head><body><center><form action="/sub/upload.php" method="POST" enctype="multipart/form-data" name="myForm" target="myiframe"><div id="yourBtn" onclick="getFile()">click to upload a file</div><div style='height: 0px;width: 0px; overflow:hidden;'><input id="upfile" type="file" name="upload" style="display:none;" onchange="sub(this)"/></div></form><iframe name="myiframe" style="width:100;height:100;border:2px solid #bbccdd;"></iframe></center></body></html>\[/code\]The Problem is .submit() function returns the ' Access Denied ' error on IE (tested in IE8 and 9). Works fine in all other browsers (chrome,opera,safari and Firefox). when the sub(obj) is invoked.So Can any one tell me how should i get this script working on IE too ?