TrentGreenawalt
Technical User
I have a specific request that I have been trying to figure out all day and I hoping that one of you can help me.
Here is what I am trying to accomplish:
Currently, I have a main page on our site with a direct link to another site. What I am trying to do is create a framed page with our logo in the top page, and display the other page in the lower window.
Now I have figured out how to do this by creating a page for each additional webpage I want to display, but I would like to create one "framed page" that will be able to display any link I send to it with the same frame at the top.
Here is what I have so far: (This is an example, but the site I am actually linking to)
The main page opens the new window with this line:
<head>
</head>
<Body>
Please visit cnn.com for all your news needs:
<a href="Frametest.html?weblink=http://www.cnn.com">CNN</a>
</Body>
Then the frametest.html file contains this code:
<HEAD>
<TITLE>ABC Company</TITLE>
</HEAD>
<FRAMESET rows= 57,* frameBorder=1>
<FRAME src="header_files/header.htm" NORESIZE scrolling="no">
<FRAME src="</FRAMESET>
So as you can see the <Frame src=" needs to be replaced with the value that I passed in the original hyperlink.
I have played around with some javascript, but I don't know it that well and really don't know what I am doing. Here is what I attempted, but it never worked.
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->
<!-- Begin
function getParams() {
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs.split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
// End -->
</script>
<TITLE>ABC Company</TITLE>
<script language="JavaScript">
<!-- Begin
wlink = unescape params "Weblink"]);
// End -->
</script>
<FRAMESET rows= 57,* frameBorder=1>
<FRAME src="header_files/header.htm" NORESIZE scrolling="no">
<FRAME src=wlink>
</FRAMESET>
</HEAD>
So there is where I am at. I really hope that you can help me with this. I really appreciate your help in this matter.
Thanks,
Trent
Here is what I am trying to accomplish:
Currently, I have a main page on our site with a direct link to another site. What I am trying to do is create a framed page with our logo in the top page, and display the other page in the lower window.
Now I have figured out how to do this by creating a page for each additional webpage I want to display, but I would like to create one "framed page" that will be able to display any link I send to it with the same frame at the top.
Here is what I have so far: (This is an example, but the site I am actually linking to)
The main page opens the new window with this line:
<head>
</head>
<Body>
Please visit cnn.com for all your news needs:
<a href="Frametest.html?weblink=http://www.cnn.com">CNN</a>
</Body>
Then the frametest.html file contains this code:
<HEAD>
<TITLE>ABC Company</TITLE>
</HEAD>
<FRAMESET rows= 57,* frameBorder=1>
<FRAME src="header_files/header.htm" NORESIZE scrolling="no">
<FRAME src="</FRAMESET>
So as you can see the <Frame src=" needs to be replaced with the value that I passed in the original hyperlink.
I have played around with some javascript, but I don't know it that well and really don't know what I am doing. Here is what I attempted, but it never worked.
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->
<!-- Begin
function getParams() {
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs.split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
// End -->
</script>
<TITLE>ABC Company</TITLE>
<script language="JavaScript">
<!-- Begin
wlink = unescape params "Weblink"]);
// End -->
</script>
<FRAMESET rows= 57,* frameBorder=1>
<FRAME src="header_files/header.htm" NORESIZE scrolling="no">
<FRAME src=wlink>
</FRAMESET>
</HEAD>
So there is where I am at. I really hope that you can help me with this. I really appreciate your help in this matter.
Thanks,
Trent