Announcement

Collapse
No announcement yet.

New Window??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Window??

    I have a link. I want to implement this link in that way so that when I will click it, it will creat a new window without any address bar or any other bar. Suppose that window just contain a picture of a Building. How to do that?

  • #2
    use javascript.

    This can be made with JavaScript:

    Code:
    <script type="text/javascript">
    function OpenWin()
    {
    	window.open('the_file.html','window_name','width=500,height=400,scrollbars=no');
    }
    </script>
    Then call it like this for example:

    Code:
    <input type="button" value="Open Window" onclick="javascript: OpenWin();"/>

    Comment


    • #3
      Well I am trying the following code using a function so that I can resize the window without modifying the original function. But it's giving me an error. Any suggestion?
      Code:
      <html>
      <head>
      <script type="text/javascript">
      function open_win(href,menubar,height,width)
      {
      window.open(href,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar="+menubar+", scrollbars=yes, resizable=no, copyhistory=no, width="+width+", height="+height+" ")
      }
      </script>
      </head>
      
      <body>
      <a target="_blank" href="http://www.php.net" onClick="open_win(this.href,yes,400,600);return false;">Open PHP</a>
      </body>
      
      </html>

      Comment


      • #4
        Originally posted by szms
        Well I am trying the following code using a function so that I can resize the window without modifying the original function. But it's giving me an error. Any suggestion?
        Try this:

        Code:
        <a href="path/to/your/file" onclick="window.open('path/to/your/file','resizable=yes,status=yes,scrollbars=yes,width=400,height=400'); return false;">Something goes here</a>

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X