Problems with opening new window without scrollbar and toolbar and with smaller size and width

Discussion in 'HTML' started by Jerry Manner, May 30, 2005.

  1. Jerry Manner

    Jerry Manner Guest

    Hi

    I recently started programming html. I am trying to create a link to open a
    small browser window. I use the following html code.

    <a href="http.telegraaf.nl" toolbar="no" width="500" height="300" left="200"
    top="20" status="no" scrollbars="yes" resize="no" >Telegraaf Website</a>

    When I click the link it opens a new ( Large) window with scroll , toll bar.
    What must I change in the html code so that a small window will be opened?

    Regards
    Jerry Manner, May 30, 2005
    #1
    1. Advertising

  2. Jerry Manner wrote:

    > I recently started programming html.


    HTML is a document markup language, not a programming language.

    > I am trying to create a link to open
    > a small browser window. I use the following html code.
    >
    > <a href="http.telegraaf.nl" toolbar="no" width="500" height="300"
    > left="200" top="20" status="no" scrollbars="yes" resize="no" >Telegraaf
    > Website</a>


    http://validator.w3.org/
    http://w3.org/TR/html4/

    You seem to be getting confused between JavaScript and HTML. Opening new
    windows is generally[1] a bad idea anyway.

    http://www.allmyfaqs.com/faq.pl?Console_window

    [1] In the sense that I'm yet to encounter a circumstance where it was a
    good idea, but I'm open minded enough to admit that it might be a
    possibility, however remote.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, May 30, 2005
    #2
    1. Advertising

  3. Jerry Manner

    SpaceGirl Guest

    Re: Problems with opening new window without scrollbar and toolbarand with smaller size and width

    Jerry Manner wrote:
    > Hi
    >
    > I recently started programming html. I am trying to create a link to open a
    > small browser window. I use the following html code.
    >
    > <a href="http.telegraaf.nl" toolbar="no" width="500" height="300" left="200"
    > top="20" status="no" scrollbars="yes" resize="no" >Telegraaf Website</a>
    >
    > When I click the link it opens a new ( Large) window with scroll , toll bar.
    > What must I change in the html code so that a small window will be opened?
    >
    > Regards
    >
    >


    You cant do that. That's not HTML. There is no way in HTML to turn off
    toolbars, or scrollbars in a parent window (only frames inside a
    frameset, but lets not go there).

    You need to write some script (javascript) to do what you are after - of
    course bearing in mind for the 5% of people who have JS turned off it
    wont work at all...


    <script type="text/javascript">
    function openPopup(myURL) {
    window.open(myURL,"mypopup","width=250,height=250,status=no,resizable=yes,top=200,left=200");
    }
    </script>
    <a href="mypage.htm" target="mypopup"
    onclick="openPopup('mypage.htm');">click here</a>
    SpaceGirl, May 30, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. UJ
    Replies:
    2
    Views:
    7,491
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  2. Gabriel Lozano-Morán
    Replies:
    2
    Views:
    505
    Gabriel Lozano-Morán
    Jul 12, 2005
  3. Sassan Komeili Zadeh

    Loading in a new window without scrollbar

    Sassan Komeili Zadeh, Jun 20, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    110
    Sassan Komeili Zadeh
    Jun 20, 2005
  4. seeeker
    Replies:
    0
    Views:
    104
    seeeker
    Apr 25, 2004
  5. pcouas
    Replies:
    0
    Views:
    243
    pcouas
    Feb 19, 2007
Loading...

Share This Page