PopEditor: opening a regular web screen without displaying the header and footer

PopEditor: opening a regular web screen without displaying the header and footer

  
1 - Is there another way to use popEditor to open a regular web screen without displaying the header and footer?
(Other then using an input parameter with an "if" screen widget).

note: would also need to switch css styles when using a popEditor (from Document to DocumentPopup and vice versa) 
(might be able to check the screen width and then switch css using javascript script)
 
icreen.width > 800) 
  document.getElementById('" ContentBody.id "').href = 'web.css'; 
</script>
<script> 
if(screen.width > 800) 
  document.getElementById('" ContentBody.id "').href = 'web.css'; 
</script>
 
Problem has been solved with CSS. 


Thanks.
Instructions:
 
1) Enclose the header and footer webblocks inside a container
2) Set the Header container name property to "Header" and the Footer container style property to "Footer"
3) Add the following unescaped Javascript expression to the bottom of the page (under the Footer container).
"<script type='text/javascript'>
 if (parent!=window){ //Is inside Popup
  document.getElementById('" + Header.Id + "').style.display='none';
  document.getElementById('" + Footer.Id + "').style.display='none';
 }
</script>"
4) done.
 
Robert, would you know a way to move your piece of Java coding to an Action / Extension?

It would be very nice if in a screen Preparation a local value e.g. "IsPopup" could be set.
This way you'd know whether you need to close the window with or without a popup notify / close.
Hi Eric

One option (and the easiest option) to do what you want would be to use an "input parameter" (IsPopup) then you wouldn't need to use that piece of javascript code that i' have mention above, instead you would hide the header/footer with an "if" widget (IsPopup) 

You would also be able to use the "IsPopup" input parameter/variable to perform the required task as you have described, since IsPopup is a local variable.

(thats how you would do it without using any javascript).

Hi Robert,

I'm actually using the IsPopup variable now to execute the popup notify / close commands,
but I think this is something that can and therefore should be determined by the platform.

Besides that I'm looking for a good Javascript example that is able to execute normal javascript and pass the values through to the local values in the platform.

Cheers,

Eric