Question:

Easiest HTML code for opening a new window?

by  |  earlier

0 LIKES UnLike

I want to add a link to my web page that will open a new 800 x 600 window to display a picture. What's the least complicated way to accomplish this? Is there a way to do it using regular HTML code?

 Tags:

   Report

5 ANSWERS


  1. The easiest way is to use the target as described above but if you actually wanted the window to be a certain dimension you need to go into the details of JavaScript.

    For example:

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin

    function regular() {

    window.open('window-sizer.html','800x6...

    function large()

    Just simply replace window-sizer.html with the link of the window you want to open.


  2. target="_blank"

    http://www.developingwebs.net/html/targe...

  3. placing a target="" tag into your link is ok however its not w3c standard for xhtml and it will not open the window to a specific size.  you need javascript for that. its easy here is the code:

    <a href="#" onclick="window.open('page.html','newWin... here for new window</a>

  4. target

    <a href="http://www.com.com" target="_blank">


  5. Noone seemed to notice that you wanted a popup window of a certain size. Use the following online code generators to   customize your window:

    Popup Window Generator - http://javascript.internet.com/generator...

    These one you can set width/height:

    http://www.dynamicdrive.com/dynamicindex...

    http://www.hypergurl.com/newwindow.html

    http://www.freewebmasterhelp.com/tools/p...

    The target="" attribute is for basic transitional and frameset doctypes.

    Ron

Question Stats

Latest activity: earlier.
This question has 5 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions