| 12:18 am on Apr 15, 2003 (gmt 0)|
parent.document.URL should probably be location.href
| 12:45 am on Apr 15, 2003 (gmt 0)|
It's because you have line breaks.
You start the document.write with a single quote (not a good idea BTW - use double quotes here and single quotes for the inside stuff).
Create a string variable:
var pg = "";
then, concatenate all your code with +
pg = "<frameset rows='117,*' frameborder='0' border='0' framespacing='0'>";
pg += "<frame name='top' src='top_frame_content.html' scrolling='no'
marginheight='0' marginwidth='0' noresize> ";
then, it's as simple as:
and you won't get those unterminated string errors.
| 9:36 pm on Apr 15, 2003 (gmt 0)|
Can't make that work either. :(
| 8:40 am on Apr 16, 2003 (gmt 0)|
If you do-
origURL = location.href +"";
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
and get rid of the newlines in your document.write as txbak suggests, it'll work. Just tested it.
If you are getting nowhere, use mozilla or netscape 4 browsers to test. Open your document in the browser and type-
in the location bar. This will pop-up a console which may help track down where the error is.
| 7:57 pm on Apr 16, 2003 (gmt 0)|
Do I add (+) to pg for each line?
pg + =
pg ++ =
| 8:08 pm on Apr 16, 2003 (gmt 0)|
pg += whatever
appends the whatever to the existing value of pg.
pg += whatever 1
pg += whatever 2
pg += whatever 3, etc.
| 11:50 pm on Apr 16, 2003 (gmt 0)|
I think I'm getting closer but I get a new error for origURL
"object doesn't support it's property or method"
| 8:39 am on Apr 17, 2003 (gmt 0)|
Paste the script so far, and I'm sure someone will suss.
| 9:48 am on Apr 17, 2003 (gmt 0)|
I've seen using both cause problems with scripts before... although, since you're getting a specific error, I doubt that this will help, other than to make your code standards compliant!
| 2:24 pm on Apr 17, 2003 (gmt 0)|
I just noticed that you put indexOf with a capital "O".
No more errors, but:
Opening a page in IE6 opens the master frameset but doesn't force the page into it. "page could not be found"
It works in N4 though.
| 4:07 pm on Apr 17, 2003 (gmt 0)|
Actually I uploaded the pages and they work fine even in IE6 just not locally on my PC.
Thanks everyone, for all the help. :)