Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WINDOW WITH NO TITLE BAR

Status
Not open for further replies.

alexfusion

Programmer
Feb 5, 2001
94
0
0
AR
Hi everyone,
I must thank you for all the aswers I found in this forum and the kindness of the experts.
Now my questions:
1-I would like to open a new window with no title bar.I have seen this before but I don't know how to define the parameter that remove the title bar.
How do I do this?
2- I need to write HTML into a new window.I do this using the document.write method.Nothing new to you.But I would like replace the content of this window every,let's say, 1 second,for example if I put a javascript clock.
I use setTimeout(function name,value) to invoke the function but this adds new content to the window instead of replace the content.For example, I would like to update the clock but not adding a new line of content to the window.I have seen working this example but the guys were using a form field to show the updated content.I don't want that way.
Is it possible to do this?

Thank you in advance.


alexfusion

mixale@hotmail.com
 
I'm not sure about the answer to number 1, but the answer to number 2 probably resides in calling windowname.document.open() before writing to the window and windowname.document.close() after writing to it. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
I have seen the abomination! Look at dragid.com for an example. Here's the script from their site. It really does have no borders, no title bar, and no ability to move or close it except by clicking the developer-provided link!

Code:
<script>

var windowW=318 // wide
var windowH=218 // high



var windowX = 10 // from left
var windowY = 10 // from top



var urlPop = &quot;netsetter.html&quot;



var title =  &quot;Free Offer&quot;



var autoclose = true


s = &quot;width=&quot;+windowW+&quot;,height=&quot;+windowH;
var beIE = document.all?true:false

function openFrameless(){
  if (beIE){
    NFW = window.open(&quot;&quot;,&quot;popFrameless&quot;,&quot;fullscreen,&quot;+s)     
    NFW.blur()
    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    var frameString=&quot;&quot;+
&quot;<html>&quot;+
&quot;<head>&quot;+
&quot;<title>&quot;+title+&quot;</title>&quot;+
&quot;</head>&quot;+
&quot;<frameset rows='*,0' framespacing=0 border=0 frameborder=0>&quot;+
&quot;<frame name='top' src='&quot;+urlPop+&quot;' scrolling=auto>&quot;+
&quot;<frame name='bottom' src='about:blank' scrolling='no'>&quot;+
&quot;</frameset>&quot;+
&quot;</html>&quot;
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close()
  } else {
    NFW=window.open(urlPop,&quot;popFrameless&quot;,&quot;scrollbars,&quot;+s)
    NFW.blur()
    window.focus() 
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
  }   
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }

}
function get_cookie(Name) {
  var search = Name + &quot;=&quot;
  var returnvalue = &quot;&quot;;
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(&quot;;&quot;, offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('poppedup')==''){
openFrameless()
document.cookie=&quot;poppedup=yes&quot;
}
}

loadornot()
</script>
 
you could just hit Ctrl-W, that will nuke the window...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top