Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 files and would like to combine them. I'm not good with frames and tired of trial and error. Trial and error is how I got the rest of this project to work.

The file I load in my browser is:
<br />
<html><br />
<br />
<frameset rows="125px,*"><br />
<br />
<!-- change the source to the file location --><br />
<frame src="file:///C:/Documents%20and%20Settings/ajester/My%20Documents/programming/frames/formDigits.htm"><br />
<br />
<frame src="http://www.google.com/search" name="showframe"><br />
</frameset><br />
<br />
</html><br />
<br />



The file it loads is:
<html>
<head>
<script type="text/javascript" language="JavaScript" src="ee.js"></script>

<script Language="Javascript">

function BuildURL(){
//var  MyURLField = new String();
var	MyURLField = '<a href="http://en.wikipedia.org/wiki/';
	MyURLField = MyURLField.concat(document.getElementById('myText').value);
	MyURLField = MyURLField.concat('" target="showframe">Wiki</a>');
	document.getElementById('span1').innerHTML = MyURLField;
	//alert("build: " +  MyURLField);  //debug
	
var	MyGoogleURL = '<a href="http://www.google.com/search?q=';
	MyGoogleURL = MyGoogleURL.concat(document.getElementById('myText').value);
	MyGoogleURL = MyGoogleURL.concat('" target="showframe">Google&apos;s</a>');
	document.getElementById('spanG').innerHTML = MyGoogleURL;
}
</script>

</head>

<body class="thebody">
<span align="center"><form name= getData>
Enter Search String: 
<input type='text' id='myText' onkeyup='BuildURL()'/>
</form></span>

<span id="spanG"><a href="http://www.google.com/search?q=junk" target="showframe">google&apos;s</a> </span>
<span id="span1"><a href="http://en.wikipedia.org/wiki/Test" target="showframe">Wiki</a></span>
 <a href="http://etc.com" target="showframe">etc</a>
<a href="http://etc.com" target="showframe">etc</a><br/>

</body>
</html>


Thanks in advance!
Posted

You can't combine a frameset file with the content file.

One thing though if the frameset file is in the same directory as the content file you could use;
<html>
<frameset rows="125px,*">
<frame src="formDigits.htm">
<frame src="http://www.google.com/search" name="showframe"> </frameset>
</html>
 
Share this answer
 
Thanks Rod!

Is there something else in HTML I can use instead of frameset that would give me the same effect? I'll probably be running the final version from a network share not a web server hence the file:/// URL.

I brought the code to work and placed on a network share and can really see the differences between IE7 and FF3.5. :omg:
 
Share this answer
 
Try an IFRAME, this example[^] would appear to show what you are trying to achieve.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900