Ask a Question related to ASP, Design and Development.

  1. #1

    Default Form Problem

    Hi,

    I've got an intranet site that allows a user to view a
    weekly diary on a page. Clicking on an item on a
    particular day...fires up a modal window with a form on it
    that allows the user to change his details for that day.

    Clicking on submit - posts the form to another .asp file
    that updates the SQL Server table. Then closes all the
    windows and returns back to the original window...forcing
    a refresh to display the new days details.

    The problem I have is that the modal window that is
    displayed...as soon as you click the submit
    button...brings up another blank window (the title of
    which is the .asp file that the information is posted to).

    I don't want this blank window to be shown.

    I've tried specifying target in the <form> tag...but it
    still does this. Does anyone know how to stop this
    happening?

    Thanks in advance...
    Mark Guest

  2. Similar Questions and Discussions

    1. Problem with CFM form.
      Hi everyone. I have a website for signing up for an event. It was working fine, but now everytime anyone tries to open the registration page they...
    2. Simple Form Problem!
      Hi, I am using a simple form 2 email program. I ama experienced programmer, But I feel very bad, as I am unable to fix this problem. All seems...
    3. is this a form problem?
      I have been wrestling with this problem for the past couple weeks, and I can't seem to get a solid answer from anyone I talk to...hopefully one or...
    4. problem with form in php
      Hi, i have a problem with a form. In my page there is the following code: ...
    5. Form Problem ! Please Help !
      My form and results are on one page. If I use : if ($Company) { $query = "Select Company, Contact From tblworking Where ID = $Company Order...
  3. #2

    Default Re: Form Problem

    > The problem I have is that the modal window that is
    > displayed...as soon as you click the submit
    > button...brings up another blank window (the title of
    > which is the .asp file that the information is posted to).
    Is there an onclick event on your button that's calling a javascript
    function? I'm not sure what else would cause the page to open in a new
    window. You may want to post your form code.


    Randy Rahbar Guest

  4. #3

    Default Form Problem

    Hi guys I am having a bit of an issue with some forms the problem is that I
    have around 6 forms that the user has to submit and they are all on different
    pages which have links so that the user can go to whichever form they want and
    then submit the data then they are then taken to a page where they can see the
    data which they have submitted the problem is though that if they skip a form
    and forget to go back to it they will get errors about variables not being
    there as that form won't have been submitted and I was just wondering is there
    anyway round this problem.

    Thanks in advance.

    theDude28 Guest

  5. #4

    Default Re: Form Problem

    I use something like:

    <CFIF IsDefined("VariableName")>

    you can use the else to let them know they need to fill out information on another page.
    -Sky


    sky4est Guest

  6. #5

    Default Re: Form Problem

    Hi,

    You could also have some temp table or just a table in the database that would
    store this data for the users as they fill out each form you would insert the
    data into the database. If I was a user and there were 6 forms and i filled
    out 5 of them and for some reason my connection dropped, I would expect to come
    back to your site and see my data there. You then could have some basic
    scheduled task that would clean up the table where you are temporarily storing
    user's form data.

    You then check if they have data in that table, if so, show it to them
    otherwise dont.

    Might be a bit more work initially, but pays off in long run.. it all depends
    on your requirements, quick and dirty or more thought out...

    -Westside

    WestSide Guest

  7. #6

    Default Re: Form Problem

    Thanks for that would i use teh cfif in the pages with the form or the page at the end?
    theDude28 Guest

  8. #7

    Default Re: Form Problem

    For the <cfif> method, I believe you would wrap the fields where you are
    getting undefined errors with that code.

    <cfif IsDefined("form.firstName")>
    ...some code ......
    </cfif>

    That code inside the <cfif> won't execute unless form.firstname is defined.

    You might be better of just defining a bunch of <cfparam's>. The <cfparam>
    tag sets a variables value if it does not exist as in:

    <cfparam form.firstName = "John">

    so if form.firstName does not exist, it will be set to "John" by default, so
    some people will do <cfparam form.firstName = ""> so its set to empty string,
    so the page won't error. Again a few ways to do this..

    -WestSide

    WestSide 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