Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    in page popup window

    Hi

    I want to create a popup that is completely contained within the page (so i guess its not really a popup). I'm looking for something where if a button is clicked, a small box will come up in the current window and become the active window, while the original window is visible but not active.

    It's hard to explain, but its a popup that is contained in the same window. And when the user presses okay or cancel on the "popup" window. They return to where they were in the original window. Is this possible? How would I do it?

    Thanks

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,146
    Thanks
    39
    Thanked 505 Times in 499 Posts

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm actually not looking for a regular popup. I'm looking for something like this:

    http://okonet.ru/projects/modalbox/
    (click on start demo or see it in action near the bottom)

    However, i had some trouble using the code that I found online. Mainly, I couldn't create a button on the popup that has a function for its onclick. So, i need some help solving that issue if someone has work with modalbox before, or if anyone can help me create my own inline popup.

    Thanks

  • #4
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,146
    Thanks
    39
    Thanked 505 Times in 499 Posts

    Lightbulb

    Quote Originally Posted by alfehaieotasdh View Post
    I'm actually not looking for a regular popup. I'm looking for something like this:

    http://okonet.ru/projects/modalbox/
    (click on start demo or see it in action near the bottom)

    However, i had some trouble using the code that I found online. Mainly, I couldn't create a button on the popup that has a function for its onclick. So, i need some help solving that issue if someone has work with modalbox before, or if anyone can help me create my own inline popup.

    Thanks
    Here's another idea ...
    Pay the author and ask him/her.

  • #5
    Regular Coder Krupski's Avatar
    Join Date
    Dec 2010
    Location
    United States of America
    Posts
    505
    Thanks
    39
    Thanked 47 Times in 46 Posts
    Quote Originally Posted by alfehaieotasdh View Post
    Hi

    I want to create a popup that is completely contained within the page (so i guess its not really a popup). I'm looking for something where if a button is clicked, a small box will come up in the current window and become the active window, while the original window is visible but not active.

    It's hard to explain, but its a popup that is contained in the same window. And when the user presses okay or cancel on the "popup" window. They return to where they were in the original window. Is this possible? How would I do it?

    Thanks
    Maybe this:

    Code:
    /**
    * A decent popup window
    **/
    function popup(url, width, height, name)
    {
        if (!name) { name = 'popup'; }
        var yes = ['scrollbars','resizable','dependent'];
        var no = ['toolbar','location','directories','status','menubar','fullscreen','channelmode'];
        var y = yes.length;
        var n = no.length;
        var lpos = (screen.width) ?  parseInt((screen.width - width) *   (1/2)) : 0; /* centered L-R */
        var tpos = (screen.height) ? parseInt((screen.height - height) * (1/4)) : 0; /* 1/4 from the top */
        var settings = 'height=' + height + ',width=' + width + ',top=' + tpos + ',left=' + lpos;
        var options = '';
        while (y--) { options += ',' + yes[y] + '=1'; }
        while (n--) { options += ',' + no[n] + '=0'; }
        window.win = window.open(url.replace(/&/g, '&'), name, settings + options);
        if (window.focus) { window.win.focus(); }
        return false;
    }
    "Anything that is complex is not useful and anything that is useful is simple. This has been my whole life's motto." -- Mikhail T. Kalashnikov


  •  

    Posting Permissions

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