can someone fix this code for me?

    var ie = (navigator.appName.indexOf("Microsoft") != -1 && 
         navigator.userAgent.indexOf("Windows 3.1") == -1 );
    if (ie) self.location.href ='', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,">

        else self.location.href = "";


i basically want my page to have no directories or menu bar
as soon as you enter it.
i thought i would do this by popping up a new window without
the menu bar...
i would like to have no delay though...
no user interaction...
just a window that pops up by itself

what is "copyhistory"?
Who is Participating?
jbirkConnect With a Mentor Commented:
If you want to remove the directories and menu bar, I'm assuming that you want this to happen for all browsers not just IE on Win 3.1?  So you'll have to modify it to for everyone, and you don't need to say "=no".  If you just leave it out the option is not included in the window.  Also "=yes" is not necesary either. So just:'', 'Sample',

My guess for "copyhistory" is that it's supposed to copy the history object of the opening window to the new window.  So this way back, and forward would still have where've you've been in the new window.  But my book does not say that copyhistory exists so I have doubts as to whether or not it actually works.  try it and tell me, I'd be interested to know!


var ie = (navigator.appName.indexOf("Microsoft") != -1 &&  navigator.userAgent.indexOf("Windows 3.1") == -1 );
if (ie)'', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,">
  location.href = "";

Copyhistory? No idea.
danteloveAuthor Commented:
i tried the copy history experiment and it doesnt work

thanks for the other pointer
one more question though:

page"a" pops up page"b"...
and i have 2 windows:
window 1 is "a" and window 2 is "b"

.how can i make
window 1 change itself to window "b"?

so i have
window 1 and 2 both showing "b"
danteloveAuthor Commented:
oh, i figured out the answer to my last question:
<META HTTP-EQUIV="Refresh"....>
OK, I never actually understood your question in the first, but I'm glad you figured it out.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.