J
Jiong Feng
I have a strange problem. I have two files test3.htm and test4.htm, as
following. they are both located on my webroot (to prevent cross domain
security issue)
test3.htm has an iframe referring to test4.htm
It is fine if I do http://mymachine.site.com/test3.htm now.
But if I remove either the css reference or the .js reference, I will get
access error. Note, in test3.htm, the .css and .js do not exist on my
website, but they do prevent the script error. Why is so strange?
(I do not want to try any document.domain code on these pages because they
are always together.And of course I do not like these dummy links to make my
page work)
Thanks
Jiong
// Test3.htm:
<html DIR="LTR">
<head>
<link rel="stylesheet" type="text/css" href="/common/nonexist.css">
<!--if I remove it, I will get error-->
<script language='javascript' src='/common/nonexist.js'></script>
<!--if I remove it, I will get error-->
<script>
function tt()
{
var framefields =
document.frames("submitframe").document.getElementsByTagName("INPUT");
framefields[0].value="456";
}
</script>
</head>
<body marginheight="0" topmargin="0">
<iframe height=0 width=0 id="submitframe" SRC="test4.htm">
</iframe>
<div class="DOCUMENT">
<form name="frmSurveyMain" action="survey.aspx" method="post"
width="100%">
<input type=button value="try" onClick="tt();">
</form>
</div>
</body>
</html>
// Test4.htm:
<html>
<head/>
<body>
<form method="POST" action="survey.aspx" style="display:none">
<INPUT TYPE="text" ID="ACTION" NAME="ACTION" VALUE='123'></INPUT>
</form>
</body>
</html>
following. they are both located on my webroot (to prevent cross domain
security issue)
test3.htm has an iframe referring to test4.htm
It is fine if I do http://mymachine.site.com/test3.htm now.
But if I remove either the css reference or the .js reference, I will get
access error. Note, in test3.htm, the .css and .js do not exist on my
website, but they do prevent the script error. Why is so strange?
(I do not want to try any document.domain code on these pages because they
are always together.And of course I do not like these dummy links to make my
page work)
Thanks
Jiong
// Test3.htm:
<html DIR="LTR">
<head>
<link rel="stylesheet" type="text/css" href="/common/nonexist.css">
<!--if I remove it, I will get error-->
<script language='javascript' src='/common/nonexist.js'></script>
<!--if I remove it, I will get error-->
<script>
function tt()
{
var framefields =
document.frames("submitframe").document.getElementsByTagName("INPUT");
framefields[0].value="456";
}
</script>
</head>
<body marginheight="0" topmargin="0">
<iframe height=0 width=0 id="submitframe" SRC="test4.htm">
</iframe>
<div class="DOCUMENT">
<form name="frmSurveyMain" action="survey.aspx" method="post"
width="100%">
<input type=button value="try" onClick="tt();">
</form>
</div>
</body>
</html>
// Test4.htm:
<html>
<head/>
<body>
<form method="POST" action="survey.aspx" style="display:none">
<INPUT TYPE="text" ID="ACTION" NAME="ACTION" VALUE='123'></INPUT>
</form>
</body>
</html>