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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Javascript coding question

    Hi,
    I have a website with a shopping cart (Tznius.com) and currently, whenever a customer adds their first item to a shopping cart, a new window pops up (Paypal) and is visible to the user. What usually happens though is that the user minimizes this window and goes back to the referrring window (my website) and continues shopping. If they try to add another item to the shopping cart though, what happens is that the item is added to the minimized window.

    So.... I'm here to ask if someone could please send me directions of how to make it such that when a person adds any item to the shopping cart, the 'minimized' window pops up again. This may not even be a Js question, it may just be an html question.

    Thank you and awaiting your replies!

    - Miriam

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    just an idea

    you could use focus!
    if you knew what the window name is called. (?)
    you could use
    <window name>.focus()
    And then it will focus that window back up.
    Regards
    VKiDV

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is correct. Instead of just using

    window.open('paypal stuff here')

    Use this instead to make the window an object:

    myWin = window.open('paypal stuff here');

    Then, focus the window (it will pop to the top):

    if(window.myWin) window.myWin.focus();
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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