Thread: Pop-up question

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    43
    Rep Power
    1

    Pop-up question


    I'm using this on a web page to open a pop-up from a text link:

    Code:
    function popuponclick(uidA)
    {
       l=(screen.width-475)/2;
       t=(screen.height-500)/2;
       my_window = window.open("./conflict_pop.php?a=" + uidA,"mywindow","status=1,width=900,height=500,scrollbars,left=300,top=300,left"+l+",top="+t);
    }
    When the pop-up opens, the page it is linked from refreshes. Why is this?
  2. #2
  3. Confusing Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    15,813
    Rep Power
    9568
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    43
    Rep Power
    1
    Originally Posted by requinix
    How are you invoking popuponclick?
    With an anchor tag. And testing shows that's it, the href="".

    If I do away with the anchor and style the text link with an underline, it's fine.

    One thing that irritates me is there is no easy way to open a page with JS using POST.

    There is a sort of "hinky" method by building invisible forms, which strikes me as convoluted...

    I'm not worried about hacking with GET, just user stupidity.

    Anyway, I think the original question here has been solved, it's the kind of tag I wrapped my JS enabled linky in...
  6. #4
  7. Lord of the Dance
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Oct 2003
    Posts
    4,077
    Rep Power
    1965
    Originally Posted by Arty Zifferelli
    With an anchor tag. And testing shows that's it, the href="".

    If I do away with the anchor and style the text link with an underline, it's fine.

    If you still needs help, can you show some code example of what is working and not working?
    Originally Posted by Arty Zifferelli
    One thing that irritates me is there is no easy way to open a page with JS using POST.

    There is a sort of "hinky" method by building invisible forms, which strikes me as convoluted...

    I'm not worried about hacking with GET, just user stupidity.
    That is what makes web development so fun, thinking of all the (im)possibilities a user can make to destroy the page.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    43
    Rep Power
    1
    The whole "gist" of this line of questions is a form with a button (or text link) that causes something to be done with the form input. I want a pop-up that allows the user to bail out, the standard "Are You Sure you really want to do this?" sort of popup. If the user chooses "No", I want no further action.

IMN logo majestic logo threadwatch logo seochat tools logo