parent.document.URL should probably be location.href
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.
Can't make that work either. :(
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.
Do I add (+) to pg for each line?
pg + =
pg ++ =
pg += whatever
appends the whatever to the existing value of pg.
pg += whatever 1
pg += whatever 2
pg += whatever 3, etc.
I think I'm getting closer but I get a new error for origURL
"object doesn't support it's property or method"
Paste the script so far, and I'm sure someone will suss.
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!
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.
Actually I uploaded the pages and they work fine even in IE6 just not locally on my PC.
Thanks everyone, for all the help. :)