PDA

View Full Version : Javascript: removing menubar on same page


6x6
09-22-2005, 05:58 AM
I have the following script, which will open the same page it is in without a menubar. However, if there is no menubar present (in other words: if it has already reloaded once), it should abort. How do I go about this? I figured something like this, which doesn't work obviously:


<script language="JavaScript">
if (menubar='yes')
{
myWin = window.open(self.location.href,'newWin','menubar=no');
}
else
{
exit;
}
</script>

smartweb
09-22-2005, 10:09 AM
Appened something to the query string, when opening the new page and check in the page code if this query string value is present. If it is there, then don't reload.

6x6
09-22-2005, 10:54 AM
Appened something to the query string, when opening the new page and check in the page code if this query string value is present. If it is there, then don't reload.

Could you perhaps provide a (script) explanation?