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

    Need to collect data from a pop-up window

    Hi everyone.
    I am new to coding please help me out.

    I have been assigned a project in which I need to bring up a pop-up window with a question (y/n format.)
    I need to collect the answers from the pop up, also depending on the answer(y/n) I need to post another question on the pop-up window.

    One more condition is that the pop-up browser should come up only after a person has browsed/opened the web-page for more than 30 sec.

    I am totally new to world of coding and this very first assignment is killing me.


    Any help/suggestions would be welcome.
    Thanks a ton in advance.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,518
    Thanks
    3
    Thanked 506 Times in 493 Posts
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • Users who have thanked vwphillips for this post:

    skashwin89 (08-25-2013)

  • #3
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks for the link shared.
    Can you please help me with the part of data collection from the pop-up and the
    timing constraint?(Pop up should come only after 30 sec of browsing a page).

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,901
    Thanks
    79
    Thanked 4,421 Times in 4,386 Posts
    Popups that appear automatically (e.g, after 30 seconds of browsing a page) will almost inevitably be BLOCKED by all modern popup blockers.

    So you do *NOT* want to use a popup. Period. You want to use a "popon". That is, a <div> that appears on top of the rest of the page.

    Vic's script is wonderful, but it's probably about 10 times more complex than you possibly need.

    Big question: You say you are supposed to "collect" the answer(s) from the popup/popon. What are you supposed to do with the collected answers? If you don't use some kind of server-side coding (PHP/ASP/JSP/etc.), then the only place they can "collect" is in the actual user's machine, which is pretty much useless.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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