I don't know JavaScript, but I'm trying to get an effect that I think can be done in JavaScript. I have dynamically-generated pages that each have a link to an external Web site. Each link should popup a new browser window with two frames -- a top frame from the originating site, and a lower frame with the external site... something like how about.com and propeller.com do it. It's not my idea, but this is the effect needed.
You need to create a page with frames structure you need and use it instead of direct links. e.g.: http://yoursite.com/external.html?url=google.com external.html has a frame set and accepts the querystring url param which is used to load the frame.
Thanks for the reply. Is there any security risk with doing that? (I could do it with PHP) Just verify that it's a valid URL?
ya but some sites can load without your frames. It is possible with a tiny js function. and as you don't control the site code in one of your frames the -->"It's not my idea, but this is the effect needed." can't be 100% achieved.
What do you mean by QUERYSTRING? Do you mean just accept an external URL as a parameter in the frameset URL? sorry, I didn't understand completely. Are you saying that there is a security risk?
No security risk. Frames are on the client-side. for example the code which loads without frames: <script language="JavaScript">if(parent.frames.length>=1 {window.top.location.href="index.html"}</script> just put it in the header section, replace "index.html" and you will be free of any frames