Hello and welcome to our community! Is this your first visit?
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
    Nov 2007
    N Michigan
    Thanked 0 Times in 0 Posts

    Problem with HOW-TO structure/code

    I am creating an application form in PHP. The customer would like a click 3/4 down the page to open a new browser window with programs and descriptions. When the user selects a program it populates the PHP form with the user's selection. I suspect cookies might be the way to go here, but I can't quite get my mind around it. I also suspect the solution will require some javascript, which I know a little about. The list of programs and their descriptions will be dynamically displayed from a MySQL DB.

    (The old html form simply had a dropdown list)

    Any direction/advice much appreciated.


  2. #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Bradford, UK
    Thanked 66 Times in 65 Posts
    This is really a javascript issue. You should ask a mod to move your thread there.

    The basics you need are :
    clicking a link to open a popup window
    clicking another link to populate the parent window's form and then close the window.

  3. Users who have thanked NancyJ for this post:

    lelyea (11-10-2008)

  4. #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Sounds like ajax is the way you'd like to go.
    From the PHP side, you want to ensure that you can correctly populate a form given a record id. Once you can do that, ajax would be a piece of cake to integrate.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  5. Users who have thanked Fou-Lu for this post:

    lelyea (11-10-2008)


Posting Permissions

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