Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Iframe question -- need dummy css and js reference to make the page work.

Reply
Thread Tools

Iframe question -- need dummy css and js reference to make the page work.

 
 
Jiong Feng
Guest
Posts: n/a
 
      01-11-2004
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.getElement sByTagName("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>






 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use an iframe as a link (make the whole iframe clickable) mi HTML 4 05-21-2008 10:13 PM
Re: aPossible to Make A "Dummy" Anchor Tag **without** Jumping Back Up??? dorayme HTML 3 05-03-2008 06:02 AM
Reference dummy xslt in xml markjcostello@gmail.com XML 1 01-27-2006 02:34 PM
How do we load page into iframe when not on iframe page? Paul Javascript 3 07-04-2005 06:59 AM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM



Advertisments