Show Subwindow

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Venkat

    Show Subwindow

    Hi All,

    I have got two windows namely parent and a child .

    My parent window has got a link, on clicking which opens a child window(i am
    using window.open function).

    I do the following set of operations

    In my parent window i click the link which results in popping up the child
    window,
    now i will minimize this child window and will click the link in parent
    window again,
    this time the child window will not popup(maximizes ), it sits on the tray in
    minimized
    position.

    Can anyone suggest me how to make child window show in maximized form when i
    click
    the link in parent window for the second time.

    Here is the piece of code i am using for the same.

    <a style='text-decoration:none '
    href="javascrip t:showSubWindow 1('ChildWindow. asp');">
    Child Window </a>

    <Script language = "JavaScript ">

    function showSubWindow1( url)
    {
    subwindow1 = true;
    var subwindow = window.open(url ,"def1",
    "HEIGHT=650,WID TH=770,SCROLLBA RS=YES,RESIZABL E=YES,status=ye s");
    }

    </Script>

    Thanks
    Venkat


  • DU

    #2
    Re: Show Subwindow

    Venkat wrote:[color=blue]
    > Hi All,
    >
    > I have got two windows namely parent and a child .
    >
    > My parent window has got a link, on clicking which opens a child window(i am
    > using window.open function).
    >
    > I do the following set of operations
    >
    > In my parent window i click the link which results in popping up the child
    > window,
    > now i will minimize this child window and will click the link in parent
    > window again,
    > this time the child window will not popup(maximizes ), it sits on the tray in
    > minimized
    > position.
    >
    > Can anyone suggest me how to make child window show in maximized form when i
    > click
    > the link in parent window for the second time.
    >[/color]

    I've answered this question, difficulty at least 20 times in the last 2
    years in 3 different newsgroups.

    Have a close look to the source code of these pages:



    and



    Theory:


    Your difficulty pinpoints an inherent flaw in the window.open() method
    and in the windowing system of current operating systems like windows,
    linux, etc.
    [color=blue]
    > Here is the piece of code i am using for the same.
    >
    > <a style='text-decoration:none '
    > href="javascrip t:showSubWindow 1('ChildWindow. asp');">
    > Child Window </a>
    >[/color]

    For **many reasons** that I won't explain here, do not use "javascript :"
    pseudo-protocol in your href attribute value.

    <a href="ChildWind ow.asp" onclick="showSu bWindow1(this.h ref); return
    false;">Child Window </a>

    7. Begin Link Names with the Most Important Keyword
    "Links are the action items on a homepage, and when you start each link
    with a relevant word, you make it easier for scanning eyes to
    differentiate it from other links on the page."
    A company's homepage is its face to the world and the starting point for most user visits. Improving your homepage multiplies the entire website's business value, so following key guidelines for homepage usability is well worth the investment.


    So, "Child Window" is not best. "My resume", "My marriage", "My garden"
    are good link editions though.


    For the best recommendable coding, I recommend given examples you can
    find at my homepage.

    [color=blue]
    > <Script language = "JavaScript ">[/color]

    type has superseded language and is both backward and forward compatible.
    [color=blue]
    >
    > function showSubWindow1( url)
    > {
    > subwindow1 = true;
    > var subwindow = window.open(url ,"def1",
    > "HEIGHT=650,WID TH=770,SCROLLBA RS=YES,RESIZABL E=YES,status=ye s");
    > }
    >
    > </Script>
    >[/color]


    Your subwindow variable must be a global variable. Look in my code for
    my variable WindowObjectRef erence. Also, do not set the height to 650
    for several reasons. Basically, cpu, RAM, and time will be wasted on
    parsing, adjusting and then resetting such height to something much
    smaller on 800x600 scr. res.
    Btw, your subwindow1 var does nothing here.
    I stronly encourage you to keep
    scrollbars=yes, resizable=yes,s tatus=yes
    as they are in your code: believe me, your users will not be irritated
    by that.

    Also,

    Ten Good Deeds in Web Design
    "8. Use link titles to provide users with a preview of where each link
    will take them, before they have clicked on it."
    Ten design elements that would increase the usability of virtually all websites if only they were employed more widely.


    "Until user agents allow users to turn off spawned windows, do not cause
    pop-ups or other windows to appear and do not change the current window
    *_without informing the user_*.
    (...)if your link spawns a new window, or causes another windows to "pop
    up" on your display, or move the focus of the system to a new FRAME or
    Window, then the nice thing to do is to tell the user that something
    like that will happen."
    W3C Web Accessibility Initiative Checkpoint 10.1


    That's why more and more sites (Microsoft, Sun Microsystems, WAVE 3.0,
    accessibility sites, J. Nielsen) use and/or recommend to use the title
    attribute and/or an image icon clearly indicating that clicking this
    link will open a new window (sub-window).

    If you need more, just check recent posts I did in this newsgroup and in
    alt.html on this whole issue.
    [color=blue]
    > Thanks
    > Venkat
    >
    >[/color]

    DU
    --
    Javascript and Browser bugs:


    Comment

    Working...