'LOCAL <% session("mode")="update" 'add a record IF Request.form("SubmitType")="add" then 'set edit mode session("mode")="add" 'connect to the database 'on error resume next set con = server.createobject("adodb.connection") con.open application("connect") & session("database") & ";" 'insert new record sql="spInsertContact " for i=1 to 6 this="new"&i sql=sql & "'" & trim(request.form(this)) & "'," next sql= sql & "'" & trim(request.form("new7")) &"'" 'execute con.execute(sql) 'close ADO objects 'rs.close con.close 'set rs = nothing set con=nothing sql="" end if 'edit a record if Request.form("SubmitType")="edit" then 'set edit mode session("mode")="edit" end if 'update a record IF Request.form("SubmitType")="update" then 'set edit mode session("mode")="update" 'connect to the database 'on error resume next set con = server.createobject("adodb.connection") con.open application("connect") & session("database") & ";" SQL="spUpdateContact " & "'" & session("thisRecord") &"'," for i=1 to 6 this="new"&i sql=sql & "'" & trim(request.form(this)) & "'," next sql= sql & "'" & trim(request.form("new7")) &"'," sql= sql & "'" & trim(request.form("new8")) &"'" con.execute(sql) 'close ADO objects con.close set con=nothing sql="" end if 'delete a record IF Request.form("SubmitType")="delete" then 'set edit mode session("mode")="delete" 'connect to the database 'on error resume next set con = server.createobject("adodb.connection") con.open application("connect") & session("database") & ";" SQL="spDelContact '" & session("thisRecord") &"'" con.execute(sql) 'close ADO objects con.close set con=nothing end if IF Request.form("SubmitType")="cancel" then 'set edit mode session("mode")="cancel" end if %> <% function setupForm() dim htmlcode if session("mode") ="edit" then session("thisRecord")= request.form("contact") 'on error resume next set con = server.createobject("adodb.connection") con.open application("connect") & session("database") & ";" htmlcode=htmlcode&"" SQL=("spContactInfoEdit '" & session("thisRecord") &"'") set rs = con.execute(SQL) if not err.number=0 then Response.Write "Error:"& err.Description err.clear() Response.End end if IF rs.eof = FALSE THEN alldata= rs.getrows numcols=ubound(alldata,1) numrows=ubound(alldata,2) htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&""& vbcrlf htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" rs.close con.close set rs = nothing set con = nothing htmlcode=htmlcode&"" else response.write "No data Returned" end if else 'setup table htmlcode=htmlcode&"
 "&RS(0).name&" :
 "&RS(1).name&" :
 "&RS(2).name&" :
 "&RS(3).name&" :
 "&RS(4).name&" :
 "&RS(5).name&" :
 "&RS(6).name&" :
 "&RS(7).name&" :
" htmlcode=htmlcode&" " 'htmlcode=htmlcode&" " htmlcode=htmlcode&" " htmlcode=htmlcode&"
" 'where [name]='" & session("thisServer") & "'") 'setup URL List thisRS=fetchSQL("select distinct a.contact as 'Name', a.[contact id] from [contact info] a join contacts b on b.[contact id]=a.[contact id] join [contact list] c on a.[contact type] = c.[contact type id] join [url list] d on d.[url id]=b.[url id] where b.[url id] in (select a.[url id] from [url list] a where a.[url id] in ( select a.[url id] from urls a join [Server info] b on b.[server id]=a.[server id] where b.name='" & session("thisServer") & "'))") htmlcode=htmlcode&"
 Contacts:

"& vbcrlf 'setup input fields htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&""& vbcrlf htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" htmlcode=htmlcode&"" 'primary section htmlcode=htmlcode&"" htmlcode=htmlcode&"" 'primary section ' add control buttons htmlcode=htmlcode&"" end if set con = nothing sql="" 'end table and form htmlcode=htmlcode&"
 Contact Name :
 Contact Type :
 Office Phone :
 Cell Phone :
 Home Phone :
 Pager :
 Email Address :
 Primary Contact?
" htmlcode=htmlcode&" " 'htmlcode=htmlcode&" " htmlcode=htmlcode&" " htmlcode=htmlcode&"

" response.write htmlcode end function %> Modify Contacts
<%=setupForm%>
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <#1uKbZhgDHA.2072@TK2MSFTNGP10.phx.gbl> [ref] => [htmlstate] => on_nl2br [postusername] => Eric P [ip] => tek_1975@yahoo. [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Form Field/ Form Submit Problems (probably an easy answer...) - ASP

Form Field/ Form Submit Problems (probably an easy answer...) - ASP

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 fine, however, when the checkbox is only field that has been modified/clicked the form doesn't always submit. When it does work, a Stored procedure is passed form variables and updates to the db are made. When it doesn't, its as if the form wasn't submitted, it reloads and resets the page, but the stored procedure isn't triggered. Any help is greatly appreciated! Thanks.....

  1. #1

    Default 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 fine,
    however, when the checkbox is only field that has been
    modified/clicked the form doesn't always submit. When it does work, a
    Stored procedure is passed form variables and updates to the db are
    made. When it doesn't, its as if the form wasn't submitted, it
    reloads and resets the page, but the stored procedure isn't triggered.
    Any help is greatly appreciated! Thanks..
    Eric Guest

  2. #2

    Default Re: Form Field/ Form Submit Problems (probably an easy answer...)

    What makes you think it's not submitting? Code?

    Ray at work

    "Eric" <tek_1975> wrote in message
    news:1ad224de.0309230920.5080ccb4posting.google.c om...
    > 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 fine,
    > however, when the checkbox is only field that has been
    > modified/clicked the form doesn't always submit. When it does work, a
    > Stored procedure is passed form variables and updates to the db are
    > made. When it doesn't, its as if the form wasn't submitted, it
    > reloads and resets the page, but the stored procedure isn't triggered.
    > Any help is greatly appreciated! Thanks..

    Ray at Guest

  3. #3

    Default Re: Form Field/ Form Submit Problems (probably an easy answer...)

    Perhaps if you showed your code, we would have a chance of assisting you.
    As it is, I can only guess your problem is a condition branch that is
    keeping your update code from
    executing.


    "Eric" <tek_1975> wrote in message
    news:1ad224de.0309230920.5080ccb4posting.google.c om...
    > 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 fine,
    > however, when the checkbox is only field that has been
    > modified/clicked the form doesn't always submit. When it does work, a
    > Stored procedure is passed form variables and updates to the db are
    > made. When it doesn't, its as if the form wasn't submitted, it
    > reloads and resets the page, but the stored procedure isn't triggered.
    > Any help is greatly appreciated! Thanks..

    Tom B Guest

  4. #4

    Default Re: Form Field/ Form Submit Problems (probably an easy answer...)

    Thanks for the responses..

    The reason why I don't think its submitting is because when I run SQL
    profiler, on a normal Submit, I can see the stored procedure hit the db
    and when it doesnt seem to work, the form looks like it submits but then
    the SP never gets triggered(this happens about 2 out of three tries when
    only the checkbox is changed). Honestly, I'm not actually sure that is
    not submitting, just that its not firing off the SP unless one of the
    text fields is modified.

    I have cut and pasted the code below. Thanks again...

    <!-- #INCLUDE FILE="hs.vbs" -->
    'LOCAL

    <%

    session("mode")="update"

    'add a record
    IF Request.form("SubmitType")="add" then

    'set edit mode
    session("mode")="add"

    'connect to the database
    'on error resume next
    set con = server.createobject("adodb.connection")
    con.open application("connect") & session("database") & ";"


    'insert new record
    sql="spInsertContact "

    for i=1 to 6
    this="new"&i
    sql=sql & "'" & trim(request.form(this)) & "',"
    next

    sql= sql & "'" & trim(request.form("new7")) &"'"


    'execute
    con.execute(sql)

    'close ADO objects
    'rs.close
    con.close
    'set rs = nothing
    set con=nothing
    sql=""


    end if

    'edit a record
    if Request.form("SubmitType")="edit" then

    'set edit mode
    session("mode")="edit"

    end if

    'update a record
    IF Request.form("SubmitType")="update" then

    'set edit mode
    session("mode")="update"


    'connect to the database
    'on error resume next
    set con = server.createobject("adodb.connection")
    con.open application("connect") & session("database") & ";"


    SQL="spUpdateContact " & "'" & session("thisRecord") &"',"

    for i=1 to 6
    this="new"&i
    sql=sql & "'" & trim(request.form(this)) & "',"
    next

    sql= sql & "'" & trim(request.form("new7")) &"',"
    sql= sql & "'" & trim(request.form("new8")) &"'"

    con.execute(sql)

    'close ADO objects
    con.close
    set con=nothing
    sql=""

    end if

    'delete a record
    IF Request.form("SubmitType")="delete" then

    'set edit mode
    session("mode")="delete"

    'connect to the database
    'on error resume next
    set con = server.createobject("adodb.connection")
    con.open application("connect") & session("database") & ";"


    SQL="spDelContact '" & session("thisRecord") &"'"

    con.execute(sql)

    'close ADO objects
    con.close
    set con=nothing


    end if


    IF Request.form("SubmitType")="cancel" then

    'set edit mode
    session("mode")="cancel"

    end if


    %>
    <%



    function setupForm()

    dim htmlcode

    if session("mode") ="edit" then

    session("thisRecord")= request.form("contact")

    'on error resume next
    set con = server.createobject("adodb.connection")
    con.open application("connect") & session("database") & ";"

    htmlcode=htmlcode&"<table width='400' class='text'><tr>"

    SQL=("spContactInfoEdit '" & session("thisRecord") &"'")

    set rs = con.execute(SQL)
    if not err.number=0 then
    Response.Write "Error:"& err.Description
    err.clear()
    Response.End
    end if

    IF rs.eof = FALSE THEN
    alldata= rs.getrows
    numcols=ubound(alldata,1)
    numrows=ubound(alldata,2)


    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(0).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new1' value='" & alldata(0,0) &"'
    maxlength='50'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(1).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><select name='new2'>"

    thischoice=fetchSQL("select [contact type],[contact type id] from
    [contact list] order by [contact type id]")

    for i=0 to ubound(thisChoice,2)
    htmlcode=htmlcode & "<OPTION Value='"&thisChoice(1,i) &"'"

    if alldata(1,0)=thisChoice(1,i) then
    htmlcode=htmlcode&" SELECTED"
    end if

    htmlcode=htmlcode&" >"&thisChoice(0,i)&"</OPTION>"& vbcrlf
    next

    htmlcode=htmlcode&"</select> </td></tr>"& vbcrlf

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(2).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new3' value='" & alldata(2,0) &"'
    maxlength='20'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(3).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new4' value='" & alldata(3,0) &"'
    maxlength='20'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(4).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new5' value='" & alldata(4,0) &"'
    maxlength='20'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(5).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new6' value='" & alldata(5,0) &"'
    maxlength='20'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(6).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='text'
    class='text' name='new7' value='" & alldata(6,0) &"'
    maxlength='20'></td><tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;"&RS(7).name&" :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input
    type='checkbox' causesvalidation='true' name='new8' value='" &
    alldata(7,0) & "'"

    'check for checked value
    if alldata(7,0)="*" then
    htmlcode=htmlcode&" CHECKED"

    end if
    htmlcode=htmlcode&" onclick='toggle(8)'></td><tr>"

    rs.close
    con.close
    set rs = nothing
    set con = nothing

    htmlcode=htmlcode&"<td colspan='2' align='center'>"
    htmlcode=htmlcode&"<input type='button' value='Update' name='update'
    onclick='updateRecord()' style='font: 8 pt Verdana, San-Serif;
    background: white;'>&nbsp;"
    'htmlcode=htmlcode&"<input type='button' value='Delete' name='delete'
    onclick='deleteRecord()' style='font: 8 pt Verdana, San-Serif;
    background: white;'>&nbsp"
    htmlcode=htmlcode&"<input type='button' value='Cancel' name='cancel'
    onclick='cancelIt()' style='font: 8 pt Verdana, San-Serif; background:
    white;'>&nbsp"
    htmlcode=htmlcode&"</td></tr>"
    else

    response.write "No data Returned"

    end if

    else

    'setup table
    htmlcode=htmlcode&"<table width='400' class='text'>"

    'where [name]='" & session("thisServer") & "'")

    'setup URL List

    thisRS=fetchSQL("select distinct a.contact as 'Name', a.[contact id]
    from [contact info] a join contacts b on b.[contact id]=a.[contact id]
    join [contact list] c on a.[contact type] = c.[contact type id] join
    [url list] d on d.[url id]=b.[url id] where b.[url id] in (select a.[url
    id] from [url list] a where a.[url id] in ( select a.[url id] from urls
    a join [Server info] b on b.[server id]=a.[server id] where b.name='" &
    session("thisServer") & "'))")

    htmlcode=htmlcode&"<tr><td width='150'><b>&nbsp;Contacts: </b></td><td
    width='200' ><SELECT Name='Contact' onchange='editRecord()'> "
    htmlcode=htmlcode & "<OPTION Value=''>--Choose Contact--</OPTION>"&
    vbcrlf
    for i=0 to ubound(thisRS,2)
    htmlcode=htmlcode & "<OPTION Value="&thisRS(1,i)
    htmlcode=htmlcode&">"&thisRS(0,i)&"</OPTION>"& vbcrlf
    next
    htmlcode=htmlcode&"</select></td></tr></table><br>"& vbcrlf


    'setup input fields

    htmlcode=htmlcode&"<table width='400'><tr><td class='boldtext'
    style='text-align:left;' width='120'>&nbsp;Contact Name :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new1' value='' maxlength='20'></td></tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Contact Type :</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><select name='new2'>"

    htmlcode=htmlcode&"<OPTION Value=''></OPTION>"& vbcrlf
    'NOPE
    thischoice=fetchSQL("select [contact type id],[contact type] from
    [contact list] order by [contact type id]")


    for i=0 to ubound(thisChoice,2)

    htmlcode=htmlcode & "<OPTION Value='"&thisChoice(0,i)
    htmlcode=htmlcode&"'>"&thisChoice(1,i)&"</OPTION>"& vbcrlf

    next

    htmlcode=htmlcode&"</select> </td></tr>"& vbcrlf

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Office Phone :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new3' value='' maxlength='20'></td></tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Cell Phone :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new4' value='' maxlength='20'></td></tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Home Phone :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new5' value='' maxlength='20'></td></tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Pager :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new6' value='' maxlength='20'></td></tr>"

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Email Address :</td>"
    htmlcode=htmlcode&"<td width='150'><input type='text' class='text'
    name='new7' value='' maxlength='50'></td></tr>"

    'primary section

    htmlcode=htmlcode&"<td class='boldtext' style='text-align:left;'
    width='120'>&nbsp;Primary Contact?</td>"
    htmlcode=htmlcode&"<td width='150' class='text'><input type='checkbox'
    causesvalidation='true' name='new8' value='' "

    'check for checked value
    if new8="*" then
    htmlcode=htmlcode&" CHECKED"

    end if
    htmlcode=htmlcode&" onclick='toggle(8)'></td></tr>"

    'primary section


    ' add control buttons
    htmlcode=htmlcode&"<td colspan='2' align='center'>"
    htmlcode=htmlcode&"<input type='button' value=' Add ' name='add'
    onclick='addRecord()' style='font: 8 pt Verdana, San-Serif; background:
    white;'>&nbsp"
    'htmlcode=htmlcode&"<input type='button' value=' Edit ' name='edit'
    onclick='editRecord()' style='font: 8 pt Verdana, San-Serif; background:
    white;'>&nbsp"
    htmlcode=htmlcode&"<input type='button' value='Close' name='cancel2'
    onclick='self.close()' style='font: 8 pt Verdana, San-Serif; background:
    white;'>&nbsp"
    htmlcode=htmlcode&"</td></tr>"



    end if

    set con = nothing
    sql=""

    'end table and form
    htmlcode=htmlcode&"</table></form><br>"
    response.write htmlcode


    end function

    %>

    <html>
    <head>
    <title>Modify Contacts</title>
    <link rel="stylesheet" href="hsdr.css">
    <base target="main-bottom">




    <script language="vbscript">

    function addRecord()


    'check for data
    if NOT doent.editcontacts.new1.value="" AND NOT
    doent.editcontacts.new2.value=""then

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

    if response=true then
    doent.forms("editcontacts").SubmitType.value="a dd"
    doent.forms("editcontacts").submit()
    end if
    else
    alert("Please fill-in required fields!")
    end if

    end function

    function editRecord()

    doent.forms("editcontacts").SubmitType.value="e dit"
    doent.forms("editcontacts").submit()

    end function

    function deleteRecord()


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

    if response=true then

    doent.forms("editcontacts").SubmitType.value="d elete"
    doent.forms("editcontacts").submit()
    end if

    end function

    function updateRecord()

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

    if response=true then


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


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

    end if

    end function

    function cancelIt()


    doent.forms("editcontacts").SubmitType.value="c ancel"
    doent.forms("editcontacts").submit()

    end function

    function toggle(this)

    select case this

    case 8

    if doent.editcontacts.new8.checked="false" then
    doent.editcontacts.new8.value="0"
    else
    doent.editcontacts.new8.value="1"
    end if

    end select

    end function

    </script>

    </head>

    <body topmargin="0" leftmargin="5" >
    <form name='editcontacts' action='editcontacts.asp' method='post'
    target='_self'>
    <input type='hidden' NAME='SubmitType' value=''>

    <%=setupForm%>

    <br>


    </body>
    </html>


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Eric P Guest

  5. #5

    Default Re: Form Field/ Form Submit Problems (probably an easy answer...)

    You have all of your code in IFs. Maybe none of the conditions is true.
    What does this do?

    IF Request.form("SubmitType")="add" then
    response.write "Submit time is add."
    end if

    if Request.form("SubmitType")="edit" then
    response.write "Submit type is edit."
    end if


    IF Request.form("SubmitType")="update" then
    response.write "Submit type is update."
    end if

    'delete a record
    IF Request.form("SubmitType")="delete" then
    response.write "Submit type is "delete."
    end if


    IF Request.form("SubmitType")="cancel" then
    response.write "Submit type is cancel."
    end if


    Ray at work


    Ray at Guest

Similar Threads

  1. Autopopulated form not displaying data in pdfunless the form field is clicked
    By shannon_coleman@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 4
    Last Post: August 27th, 09:21 PM
  2. required field vs disabled submit button.in a form
    By snark66 in forum Coldfusion - Getting Started
    Replies: 6
    Last Post: October 17th, 11:28 AM
  3. Replies: 3
    Last Post: May 13th, 12:15 AM
  4. Form verification and creating a hidden field on submit
    By Silencer01 webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: November 17th, 10:31 PM
  5. form field submit order
    By toedipper in forum ASP
    Replies: 0
    Last Post: July 29th, 10:46 PM

Bookmarks

Posting Permissions

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