tedster

msg:4196697 | 2:04 am on Sep 5, 2010 (gmt 0) |
Hello HolyDoom Witch, and welcome to the forums. Yes, you can do this with some JavaScript. I explained the basics here: Handy Generic JavaScript Coding [webmasterworld.com]. Loook for the post with the title FORCE MANY PAGES INTO FRAMES Since you "are not a coder" you may want to tap someone who understands a bit of coding to help. But the instructions in that thread are really straightforward. Many people often over-think it, but the instructions do work exactly as described.
|
HolyDoom Witch

msg:4196846 | 5:53 pm on Sep 5, 2010 (gmt 0) |
I added this: passpage = document.URL if (top.location == self.location) location.replace("master.html?" + passpage) Now, after the question mark, I tried inserting the directory many ways, but somehow the script is showing in the page itself when I press F12 to test in Opera. I have created the master.html page in the public_html directory already. I tried inserting the script: 1. before & after <html> 2. before & after <head> (I guess we have to place it after this.) But it still shows in the page. It is just plain text till now. Of course there is something I don't understand. Thx Expression Web 4 Trial XP 64-bit Java installed
|
tedster

msg:4196898 | 8:15 pm on Sep 5, 2010 (gmt 0) |
Did you create the new page master.html as described in that post?
|
HolyDoom Witch

msg:4197060 | 8:52 am on Sep 6, 2010 (gmt 0) |
As you can see above, I already mentioned that. Thx
|
tedster

msg:4197258 | 6:22 pm on Sep 6, 2010 (gmt 0) |
Sorry for the misunderstanding - I meant did you follow the exact details of how to create that page. What is not clear to me is what you mean by "I tried inserting the directory many ways" - what "directory" are you speaking of?
|
kaled

msg:4197543 | 9:01 am on Sep 7, 2010 (gmt 0) |
I used to use similar code (many years back) but I seem to recall Opera was always a problem. If it works in IE and Firefox, you're probably doing it right. Incidentally if (top==self) always worked fine for me. Kaled.
|
HolyDoom Witch

msg:4197824 | 5:10 pm on Sep 7, 2010 (gmt 0) |
By 'directory', I mean the filename including the path. Whatever code you have provided for the master.html, I inserted in a blank page (at the indicated spot), and tried testing the child document alone, to see if it opens in a frame instead of opening alone. But as I said, the code is visible near the heading of the page. I also don't understand exactly where I have to insert the filename. passpage = document.URL if (top.location == self.location) location.replace("master.html?" + passpage) In the above code, I insert my page name after the question mark. And yes, it's the same in IE8 too. Thanks
|
tedster

msg:4197943 | 6:14 pm on Sep 7, 2010 (gmt 0) |
| In the above code, I insert my page name after the question mark. |
| You don't need to do that. "passpage" is a variable. The earlier part of the script automatically assigns it the value of the fragment page's address. The script handles it all, so you don't need to insert the actual file name anywhere. The script will handle an indefinite number of files this way, without any concern on your part for inserting the actual file name.
|
kaled

msg:4198076 | 11:42 pm on Sep 7, 2010 (gmt 0) |
I would use the following...
<head> <script type="text/javascript"> if (top==self) { location.replace("master.html?" + location.href) } </script> ... </head> Actually, I wouldn't use this, I would use frameless frames but that's a whole lot more complicated. Kaled.
|
tedster

msg:4198129 | 2:44 am on Sep 8, 2010 (gmt 0) |
Yes, that is simpler. I wrote the script the way I did back in 2001 so that the individual steps in logic stood out a bit more for the reader. The exact way it appears there, with all the apparent redundancy, does work in Opera - or at least it did. I haven't used it for a good while now.
|
|