Submitting Form Var Problem

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Submitting Form Var Problem

    I have two dropdown list:

    frm_cbo_top

    frm_cbo_bottom


    I have an OnChange="submit_form();" in each of these dropdown lists -
    the javascript does a form.submit() call

    The problem is that the post .php file which gets called *always*
    catches this line:

    if ($frm_cbo_top)
    {
    // do some work
    }

    Even when I make a selection in the bottom dropdown object the
    $frm_cbo_top var if statement is active because the code flow goes
    into the section - I want the $frm_cbo_bottom to catch is I select
    that dropdown and the $frm_cbo_bottom to catch if I select that
    dropdown - what am I missing here?

    Thanks...


    Ralph Freshour Guest

  2. Similar Questions and Discussions

    1. after submitting form go to page . . . .
      I want the user to end up on a thank you page after submitting the form. How is that done?
    2. Submitting form
      Can i know whether any1 know hw to submit our form after validating to another form where we can get the input from the first page for .mxml?? And...
    3. Use PDf fill in form in Website and submitting form info.
      I feel like I'm 99% there, but I am missing something. I created the PDF form offline and tested submitting it. It works fine. When I upload and...
    4. Auto Submitting Form Problem !!
      I have a form with a drop down list.. When the user selects the value from the list I want it to refresh automatically, as if the user has...
    5. Submitting form with a unique ID
      Hi All, I'm looking for some information/code samples on how I can create a simple web form that includes an auto-generated Unique ID on the...
  3. #2

    Default Re: Submitting Form Var Problem

    "Ralph Freshour" <ralph@primemail.com> wrote in message
    news:usa2qvoupoers1gelqidfj8dutgt6ifmml@4ax.com...
    > I have two dropdown list:
    >
    > frm_cbo_top
    >
    > frm_cbo_bottom
    >
    >
    > I have an OnChange="submit_form();" in each of these dropdown lists -
    > the javascript does a form.submit() call
    >
    > The problem is that the post .php file which gets called *always*
    > catches this line:
    >
    > if ($frm_cbo_top)
    > {
    > // do some work
    > }
    >
    > Even when I make a selection in the bottom dropdown object the
    > $frm_cbo_top var if statement is active because the code flow goes
    > into the section - I want the $frm_cbo_bottom to catch is I select
    > that dropdown and the $frm_cbo_bottom to catch if I select that
    > dropdown - what am I missing here?
    >
    > Thanks...
    >
    frm_cbo_top is being submitted in the form with the value currently
    selected, even if you use the bottom select box.

    Give frm_cbo_top an empty default selected value:

    <OPTION VALUE="" SELECTED>Select a value</OPTION>

    and test for that in PHP:

    if($frm_cbo_top != '')

    HTH


    jn Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139