Click to See Complete Forum and Search --> : Dynamic Frames


cpdj
11-09-2003, 09:23 PM
I cannot get this right.

1. I need to modify the script and remove the window.open and have the links open in the same window.

2. I need the branding or both frames set to SCROLLING="auto", MARGINWIDTH="0", MARGINHEIGHT="0"


<!-- Begin
percent = "10%";
function frameBranding(actualurl, brandingurl, frametype) {
var framewin = window.open("","brandingframe");
with (framewin.document) {
write("<html><frameset " + frametype + "=" + percent + ",*>");
write("<frame src=" + brandingurl + ">");
write(" <frame src=" + actualurl + ">");
write("</frameset></html>");
}
return false;
}
// End -->

this is how I am linking to the script.

<a href="http://www.altavista.com/" onClick="return frameBranding('http://www.altavista.com', 'http://google.com, 'rows');">Altavista</a>

Khalid Ali
11-09-2003, 09:59 PM
remove the onclick event from the link(or anchor tag) and it will open the altavista link in the same window.

cpdj
11-09-2003, 10:33 PM
I tried it but cannot get it to call the function "frameBranding"

Khalid Ali
11-09-2003, 10:41 PM
ok I think I get it,
you want to pas urls to this function which in return opens a frameset using the urls you provide to it, and you wnat to open it in the current windowyou will not be able to this in this manner,because window.open will always open a new window.

what you can do is create a page (simple html page(
in that you add functionality that would read the URL,and parse the urls from the url and then create the frameset code and write it in this page.

you pass the urls from the other page to this by apending urls in the URL..
hope the repetition of url is not driving you disssssy...lol