SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm looking for a javascript which allows the following:

    I have a button, when I click on it I want the browser to open an extra window (300 by 300). I want users to preform an action on this window, before they can continue working in the main window.

    Does anyone know what javascript I need...?

    I have the following:

    <input type='button' name='Button' value='Edit' onClick="window.open('edit.php?subcatid=$subcatid','','width=350,height=200,target=child');">

    This does open a window, but I can still click in the main window...

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    Los Angeles
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the following syntax
    window.open(url,n name, "menubar,resizable,width=250,height=350")

  3. #3
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's not an answer to my question... if you see what I wrote in the first message you'll see that I already had that one.

    I want to pop-up a window which inactivates the parent window until the pop-up window is closed.

  4. #4
    I believe you have my stapler. scrubz's Avatar
    Join Date
    Feb 2001
    Location
    Van down by the river
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the child window body tag:

    <body onBlur="this.focus();">

    And in your main window:

    <body onFocus="if(window.myWinName){window.myWinName.focus();}">

    ... and you'll have to give your child window a name when you create it...

    <input type='button' name='Button' value='Edit' onClick="window.open('edit.php?subcatid=$subcatid','myWinName','width=350,height=200,target=child');">

    Warning: This could annoy and confuse the user.

  5. #5
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx for your help, scrubz...
    I'll give it a try.

    About annoying the user: It's a content management system, they have to perform an action in the child window, otherwise the system cannot continu.

    And it doesn't happen too often, so I'm not worrying about it.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •