Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

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

Jiong Feng
Posts: n/a
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 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)

// Test3.htm:
<html DIR="LTR">
<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-->
function tt()
var framefields =
document.frames("submitframe").document.getElement sByTagName("INPUT");
<body marginheight="0" topmargin="0">
<iframe height=0 width=0 id="submitframe" SRC="test4.htm">
<div class="DOCUMENT">
<form name="frmSurveyMain" action="survey.aspx" method="post"
<input type=button value="try" onClick="tt();">

// Test4.htm:
<form method="POST" action="survey.aspx" style="display:none">

Reply With Quote

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 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