ASP Form Doesn't Always Submit

Ask a Question related to ASP, Design and Development.

  1. #1

    Default ASP Form Doesn't Always Submit

    Hello everyone,

    I am pretty much newbie to ASP so please bear with me as I explain my
    problem. I currently have a main form which displays data queried
    from a SQL database. From that main page I have a hyperlink which
    opens a child window and allows edits to the data displayed on the
    parent form. As the child form is submitted, it is updating the
    database, then it refreshes the parent page and closes itself. That
    all works properly, however, sometimes after pressing the update
    button nothing is submitted. It looks as though it has been submitted
    but when running 'profiler' I see that there have been no sql updates
    against the db. When I remove the window.close(performed directly
    after the submit, see below) from the child form it works everytime
    without fail. Is it possible that the form sometimes closes before
    the submit is actually finished? Any help/advice is greatly
    appreciated! Thanks!


    function updateRecord()

    'check with the user
    response=confirm("Update record?")

    if response=true then


    document.forms("editcontacts").SubmitType.value="u pdate"
    document.forms("editcontacts").Submit()

    window.opener.location.reload()
    window.close
    end if

    end function
    Eric Guest

  2. Similar Questions and Discussions

    1. Submit PDF Form
      I've created my first PDF Form in Acrobat 7.0 Professional, with a "submit-form" button. Now, I want the filled-out form to be sent as an attachment...
    2. Form does not submit in Mac
      Hi all, I am using the submitForm() on my submit button. I have set the URL to "/Save.aspx" which will get the submitted information and doing...
    3. Need Help With Submit Form
      I have DW 3 and designing my own site. I would like my customer to be able to fill out a form. I know how to create a form, I don't know how to get...
    4. Form submit
      Mira, If you move from one page to another then the objects which were on the first page wouldn't be accessible from the second. Is this what...
    5. Form Field/ Form Submit Problems (probably an easy answer...)
      Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works...
  3. #2

    Default Re: ASP Form Doesn't Always Submit

    It's safer to submit the form, then on the receiving form, after all of the
    data is validated and the database updated, send the close and refresh code.



    "Eric" <tek_1975@yahoo.com> wrote in message
    news:1ad224de.0309191043.2c2da775@posting.google.c om...
    > Hello everyone,
    >
    > I am pretty much newbie to ASP so please bear with me as I explain my
    > problem. I currently have a main form which displays data queried
    > from a SQL database. From that main page I have a hyperlink which
    > opens a child window and allows edits to the data displayed on the
    > parent form. As the child form is submitted, it is updating the
    > database, then it refreshes the parent page and closes itself. That
    > all works properly, however, sometimes after pressing the update
    > button nothing is submitted. It looks as though it has been submitted
    > but when running 'profiler' I see that there have been no sql updates
    > against the db. When I remove the window.close(performed directly
    > after the submit, see below) from the child form it works everytime
    > without fail. Is it possible that the form sometimes closes before
    > the submit is actually finished? Any help/advice is greatly
    > appreciated! Thanks!
    >
    >
    > function updateRecord()
    >
    > 'check with the user
    > response=confirm("Update record?")
    >
    > if response=true then
    >
    >
    > document.forms("editcontacts").SubmitType.value="u pdate"
    > document.forms("editcontacts").Submit()
    >
    > window.opener.location.reload()
    > window.close
    > end if
    >
    > end function

    Tom B 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