Form to Email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    Form to Email

    Hi,

    I have some database records which are listed out in a table on an asp
    page.
    The table is within a <formtag.
    At the end of each record (and table row), I have created a <select>
    dropdown box to appear.

    The user selects an item for each record in the list, then hits submit.

    The following code is used to create the body of the email:

    For Each i in Request.Form
    MailBody = MailBody & Request.Form(i) & vbcrlf
    Next

    What I need in the body is the first database field printed on the form
    in each record and the selected item from the dropdown against that
    record

    i.e.

    Product A Yes
    Product B No
    Product C Yes

    I have tried adding a hidden input type to carry the Product Code but
    all I get is the following as my email body:

    Select Status, Select Status, Select Status, Approved, Select Status,
    Select Status, Select Status, Approved, Select Status, Select Status,
    Approved, Select Status, Select Status
    070512001R, 069435001Q, 069424001Q, 069321001Q, 069305001Q, 069270001Q,
    069167001Q, 068744001Q, 068677001Q, 068677001Q, 068466001Q, 066497001Q,
    061097001Q
    Submit

    Where 'Select Status' is the default text to show in the dropdown.

    It first goes through all the dropdown results, and them through all
    the product codes and for some reason, the vbcrlf is not working ? How
    can I print them together in sets ?

    I need the body to show

    070512001R = Approved
    069435001Q = Approved

    etc

    PLEASE CAN YOU HELP ME DO THIS, THANKS

    Thanks

    David

  • Ray Costanzo [MVP]

    #2
    Re: Form to Email

    Can you post the HTML portion of your form, or just a sampling of a few rows
    from the table at least?

    Ray at work

    "David" <davidgordon@sc ene-double.co.ukwro te in message
    news:1161776261 .166789.84730@i 3g2000cwc.googl egroups.com...
    Hi,
    >
    I have some database records which are listed out in a table on an asp
    page.
    The table is within a <formtag.
    At the end of each record (and table row), I have created a <select>
    dropdown box to appear.
    >
    The user selects an item for each record in the list, then hits submit.
    >
    The following code is used to create the body of the email:
    >
    For Each i in Request.Form
    MailBody = MailBody & Request.Form(i) & vbcrlf
    Next
    >
    What I need in the body is the first database field printed on the form
    in each record and

    Comment

    • Mike Brind

      #3
      Re: Form to Email

      "David" <davidgordon@sc ene-double.co.ukwro te in message
      news:1161776261 .166789.84730@i 3g2000cwc.googl egroups.com...
      Hi,
      >
      I have some database records which are listed out in a table on an asp
      page.
      The table is within a <formtag.
      At the end of each record (and table row), I have created a <select>
      dropdown box to appear.
      >
      The user selects an item for each record in the list, then hits submit.
      >
      The following code is used to create the body of the email:
      >
      For Each i in Request.Form
      MailBody = MailBody & Request.Form(i) & vbcrlf
      Next
      >
      What I need in the body is the first database field printed on the form
      in each record and the selected item from the dropdown against that
      record
      >
      i.e.
      >
      Product A Yes
      Product B No
      Product C Yes
      >
      I have tried adding a hidden input type to carry the Product Code but
      all I get is the following as my email body:
      >
      Select Status, Select Status, Select Status, Approved, Select Status,
      Select Status, Select Status, Approved, Select Status, Select Status,
      Approved, Select Status, Select Status
      070512001R, 069435001Q, 069424001Q, 069321001Q, 069305001Q, 069270001Q,
      069167001Q, 068744001Q, 068677001Q, 068677001Q, 068466001Q, 066497001Q,
      061097001Q
      Submit
      >
      Where 'Select Status' is the default text to show in the dropdown.
      >
      It first goes through all the dropdown results, and them through all
      the product codes and for some reason, the vbcrlf is not working ? How
      can I print them together in sets ?
      >
      I need the body to show
      >
      070512001R = Approved
      069435001Q = Approved
      >
      Basic HTML. You need to provide different names to each of your select
      lists so that they can be identified uniquely. Where you have a default
      text in the drop down, make sure its value is set to an empty string eg
      <option value="">Select Status</option>. If you don't provide a value
      attribute for an option, it picks up on whatever the option is. If you
      provide the same name to all your select lists, they will be passed in a
      comma-delimited string (which makes parsing the results more difficult).

      --
      Mike Brind


      Comment

      • David

        #4
        Re: Form to Email

        Ray,

        Here is the line which prints out the records within a loop in my asp
        page:

        response.write "<td align=center><A
        HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=" & RS("ReportID") & ">" &
        ref & "</a></td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
        "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
        "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
        "</B></td><td align=LEFT>" & money & "</B></td><TD>" & FD &
        "</TD><input TYPE=hidden name=PO VALUE=" & ref & "></tr>"

        The variables 'ref', 'part', 'serial', 'cause', 'money' might be text
        strings or database records.

        The <select tagagainst each record is defined in the top of the page
        and set to a variable called FD, which is on the bottom line of the
        code above

        <TD>" & FD & "</TD>

        FD = "<select name=select><op tion>Approved</option><option> Not
        Approved</option><option> Scrap at your location</option><option
        selected>Select Status</option></select>"

        I cannot name each select tag seperately as there is only 1, and the
        asp repeats it for each record in the loop.

        If you can suggest a better way to go about this i'm all ears and
        really appreciate your advise and help, thanks so much.

        Comment

        • David

          #5
          Re: Form to Email

          Mike,

          Thanks for your advise. I only have 1 select statement. Please see my
          reply to Ray.

          David

          Comment

          • Ray Costanzo [MVP]

            #6
            Re: Form to Email

            Can you post the HTML, I mean? Not the ASP code.

            Thanks,

            Ray at work

            "David" <davidgordon@sc ene-double.co.ukwro te in message
            news:1161778771 .100345.32300@e 3g2000cwe.googl egroups.com...
            Ray,
            >
            Here is the line which prints out the records within a loop in my asp
            page:
            >
            response.write "<td align=center><A
            HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=" & RS("ReportID") & ">" &
            ref & "</a></td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
            "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
            "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
            "</B></td><td align=LEFT>" & money & "</B></td><TD>" & FD &
            "</TD><input TYPE=hidden name=PO VALUE=" & ref & "></tr>"
            >
            The variables 'ref', 'part', 'serial', 'cause', 'money' might be text
            strings or database records.
            >
            The <select tagagainst each record is defined in the top of the page
            and set to a variable called FD, which is on the bottom line of the
            code above
            >
            <TD>" & FD & "</TD>
            >
            FD = "<select name=select><op tion>Approved</option><option> Not
            Approved</option><option> Scrap at your location</option><option
            selected>Select Status</option></select>"
            >
            I cannot name each select tag seperately as there is only 1, and the
            asp repeats it for each record in the loop.
            >
            If you can suggest a better way to go about this i'm all ears and
            really appreciate your advise and help, thanks so much.
            >

            Comment

            • David

              #7
              Re: Form to Email

              I have sent the pages to you direct, hope this is ok.

              Comment

              • Ray Costanzo [MVP]

                #8
                Re: Form to Email

                Can you post the HTML? Just load the page in your browser and do a
                view-source to get it.

                Ray at work

                "David" <davidgordon@sc ene-double.co.ukwro te in message
                news:1161786360 .938413.244010@ f16g2000cwb.goo glegroups.com.. .
                >I have sent the pages to you direct, hope this is ok.
                >

                Comment

                • David

                  #9
                  Re: Form to Email


                  <HTML>

                  <head>


                  <style type="text/css">



                  ul#split,ul#spl it li{margin:0;pad ding:0;list-style:none}
                  ul#split li{float:CENTER ;width:1100px;m argin:0 10px 10px 0}
                  ul#split h3{font: normal 90%/1.0 Verdana,sans-serif;
                  text-transform:upper case;margin:0px ;padding: 5px 5px
                  5px;text-align:CENTER;co lor: #000}
                  ul#split p{margin:0;padd ing:5px 8px 5px}
                  ul#split div{background: #C5E6F6}
                  li#one h3{background: #C8C866}
                  li#two h3{background: #FFBD00}
                  li#three h3{background: #E3A1C4}
                  </style>
                  <script type="text/javascript" src="niftycube. js"></script>
                  <script type="text/javascript">
                  window.onload=f unction(){
                  Nifty("ul#split h3","top");
                  Nifty("ul#split div","bottom same-height");
                  Nifty("div#box" ,"big");
                  }
                  </script>

                  </head>


                  <BODY bgcolor="#FFFFC C">







                  <center>



                  <%




                  FD = "<select name=select><op tion>Approved</option><option> Not
                  Approved</option><option> Scrap at your location</option><option
                  selected>Select Status</option></select>"


                  info = "Received at Scene Double"

                  strquery = "SELECT reports.Charges , reports.BB_Appr oval,
                  reports.ReportI D, reports.Custome rID, reports.ReportD ate,
                  reports.DateRet urned, reports.YourPar t, reports.YourRef ,
                  'reports.Firmwa re Version', 'reports.Hardwa re Version',
                  reports.FaultRe ported, reports.FaultDe scription, 'reports.Fault Found',
                  reports.Cause, reports.ActionT aken, reports.BoxCont ents,
                  reports.Comment s, reports.General Notes, reports.EditRef urbNotes,
                  reports.Custome r, reports.Serial, reports.Country , reports.RepairS ite,
                  reports.Job, reports.Warrant y, reports.Charges , reports.ReportT S,
                  reports.RefurbS erial, reports.LocalFW , reports.RemoteF W,
                  reports.Receive dDate, reports.Status, reports.StatusN otes FROM reports"
                  strquery = strquery & " WHERE ((reports.BB_Ap proval='Awaitin g
                  Approval') and (reports.Custom erID=13)) ORDER BY reports.YourRef
                  DESC,reports.Se rial;"




                  Set RS = adoDataConn.Exe cute(strquery)



                  if RS.EOF then


                  response.write "All repairs at Scene Double have either been Approved
                  or Shipped back to you" & vbcrlf & "Please use our search facility for
                  locating specific repairs"




                  else


                  RESPONSE.WRITE "<ul id=split>"
                  RESPONSE.WRITE "<li id=one><h3>-- Repairs currently in progress at
                  Scene Double --</H3>"
                  RESPONSE.WRITE "<div><form name=Approval method=post
                  action=processe mail_approval.a sp>"



                  response.write "<table><tr ><td align=center><b >Your
                  PO#</TD><td>&nbsp;&n bsp;&nbsp;</td><TD align=center><b >Part
                  Code</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center><b >Serial
                  Number</td><td>&nbsp;&n bsp;&nbsp;</td><td
                  align=center><b >Status</td><td align=center><b >Charge</td></tr><tr>"

                  do while NOT RS.EOF

                  If RS("Cause") = "" or isnull(RS("Caus e")) then
                  cause = "Unknown Cause"
                  else
                  cause = RS("Cause")
                  end if


                  If RS("YourRef") = "" or isnull(RS("Your Ref")) then
                  ref = "Unknown PO#"
                  else
                  ref = RS("YourRef")
                  end if

                  If RS("YourPart") = "" or isnull(RS("Your Part")) then
                  part = "Unknown Product Code"
                  else
                  part = RS("YourPart")
                  end if

                  If RS("Serial") = "" or isnull(RS("Seri al")) then
                  serial = "No Serial Number"
                  else
                  serial = RS("Serial")
                  end if

                  If RS("Status") = "" or isnull(RS("Stat us")) then
                  status = "Currently Unknown"
                  else
                  status = RS("Status")
                  end if


                  '-------------- BEGIN CHARGES ------------------

                  if RS("Charges") = "" or ISNULL(RS("Char ges")) then
                  money = "Awaiting"

                  elseif RS("Charges") = "FOC" then
                  money = "FOC"

                  else
                  money = RS("Charges")

                  'money = "<a href='#'
                  onclick=window. open('http://www.ozforex.com .au/tools/customConvert.a sp?NC_ID1=GBP&N C_ID2=USD&BG=1C 8CB3&amount="
                  & CINT(RS("Charge s")) &
                  "&l=www.ozforex .com.au/images/tools/fxTranzfers.gif ','ozforexWin', 'toolbar=no,men ubar=no,scrollb ars=no,resizabl e=no,status=no, location=no,dir ectories=no,cop yhistory=no,dep endent=0,height =360,width=250' );
                  return false; onMouseOver=sta tus='Launch Sample'; return true"
                  onMouseOut=stat us='';return true>OzForex Currency Converter</a>"


                  'money = CH & "<script
                  src=http://coinmill.com/frame.js></script><script> var
                  currency_round= true;</scriptGBP (approx
                  $<script>curren cy_show_convers ion(" & CH & ",'GBP','USD'); </script>
                  USD)"

                  END IF

                  '-------------- END CHARGES ------------------







                  If RS("YourRef") = "" or isnull(RS("Your Ref")) then

                  response.write "<td align=center>" & ref &
                  "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
                  "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
                  "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
                  "</B></td><td align=LEFT>" & money & "</B></td></tr>"

                  else

                  response.write "<td align=center><A
                  HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=" & RS("ReportID") & ">" &
                  ref & "</a></td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
                  "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
                  "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
                  "</B></td><td align=LEFT>" & money & "</B></td><TD>" & FD &
                  "</TD><input TYPE=hidden name=PO VALUE=" & ref & "></tr>"

                  end if






                  rs.movenext

                  Loop




                  end if


                  RESPONSE.WRITE "</TABLE></div></LI></UL><input type=reset name=Reset
                  value=Reset><in put type=submit name=Submit value=Submit></form>"




                  %>



                  </font>
                  </body>

                  </html>

                  Comment

                  • Ray Costanzo [MVP]

                    #10
                    Re: Form to Email

                    Dave, load the page in your browser and do a view-source! This is still the
                    ASP code!

                    Ray at work

                    "David" <davidgordon@sc ene-double.co.ukwro te in message
                    news:1161787503 .273061.228100@ i3g2000cwc.goog legroups.com...
                    >
                    <HTML>
                    >
                    <head>
                    >
                    >
                    <style type="text/css">
                    >
                    >
                    >
                    ul#split,ul#spl it li{margin:0;pad ding:0;list-style:none}
                    ul#split li{float:CENTER ;width:1100px;m argin:0 10px 10px 0}
                    ul#split h3{font: normal 90%/1.0 Verdana,sans-serif;
                    text-transform:upper case;margin:0px ;padding: 5px 5px
                    5px;text-align:CENTER;co lor: #000}
                    ul#split p{margin:0;padd ing:5px 8px 5px}
                    ul#split div{background: #C5E6F6}
                    li#one h3{background: #C8C866}
                    li#two h3{background: #FFBD00}
                    li#three h3{background: #E3A1C4}
                    </style>
                    <script type="text/javascript" src="niftycube. js"></script>
                    <script type="text/javascript">
                    window.onload=f unction(){
                    Nifty("ul#split h3","top");
                    Nifty("ul#split div","bottom same-height");
                    Nifty("div#box" ,"big");
                    }
                    </script>
                    >
                    </head>
                    >
                    >
                    <BODY bgcolor="#FFFFC C">
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    <center>
                    >
                    >
                    >
                    <%
                    >
                    >
                    >
                    >
                    FD = "<select name=select><op tion>Approved</option><option> Not
                    Approved</option><option> Scrap at your location</option><option
                    selected>Select Status</option></select>"
                    >
                    >
                    info = "Received at Scene Double"
                    >
                    strquery = "SELECT reports.Charges , reports.BB_Appr oval,
                    reports.ReportI D, reports.Custome rID, reports.ReportD ate,
                    reports.DateRet urned, reports.YourPar t, reports.YourRef ,
                    'reports.Firmwa re Version', 'reports.Hardwa re Version',
                    reports.FaultRe ported, reports.FaultDe scription, 'reports.Fault Found',
                    reports.Cause, reports.ActionT aken, reports.BoxCont ents,
                    reports.Comment s, reports.General Notes, reports.EditRef urbNotes,
                    reports.Custome r, reports.Serial, reports.Country , reports.RepairS ite,
                    reports.Job, reports.Warrant y, reports.Charges , reports.ReportT S,
                    reports.RefurbS erial, reports.LocalFW , reports.RemoteF W,
                    reports.Receive dDate, reports.Status, reports.StatusN otes FROM reports"
                    strquery = strquery & " WHERE ((reports.BB_Ap proval='Awaitin g
                    Approval') and (reports.Custom erID=13)) ORDER BY reports.YourRef
                    DESC,reports.Se rial;"
                    >
                    >
                    >
                    >

                    Comment

                    • David

                      #11
                      Re: Form to Email

                      That is what I did ? as most of the html is written out by
                      response.write statements

                      RESPONSE.WRITE "<div><form name=Approval method=post
                      action=processe mail_approval.a sp>"

                      asp ......



                      response.write "<td align=center><A
                      HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=" & RS("ReportID") & ">" &
                      ref & "</a></td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
                      "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
                      "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
                      "</B></td><td align=LEFT>" & money & "</B></td><TD>" & FD &
                      "</TD><input TYPE=hidden name=PO VALUE=" & ref & "></tr>"

                      end if

                      rs.movenext

                      Loop

                      end if


                      RESPONSE.WRITE "</TABLE></div></LI></UL><input type=reset name=Reset
                      value=Reset><in put type=submit name=Submit value=Submit></form>"

                      Comment

                      • Mike Brind

                        #12
                        Re: Form to Email


                        "David" <davidgordon@sc ene-double.co.ukwro te in message
                        news:1161778926 .511117.50650@f 16g2000cwb.goog legroups.com...
                        Mike,
                        >
                        Thanks for your advise. I only have 1 select statement. Please see my
                        reply to Ray.
                        >
                        David
                        >
                        Seems from the ASP that you posted earlier that you are creating a select
                        list for each record in the recordset? That's more than one. Do as Ray
                        said, run the page to generate your form and then paste the resulting html
                        here.

                        --
                        Mike Brind


                        Comment

                        • David

                          #13
                          Re: Form to Email

                          ok, I have dynamically given the <SELECTTAG a new name on each loop,
                          i.e. 1, 2, 3, 4, 5
                          as follows:

                          As it stands, I have managed to create the following in my email body:
                          How can I replace the ',' with '=' and how can I remove 'Submit' from
                          the forms collection.

                          070512001R, Approved
                          069435001Q, Not Approved
                          Submit
                          069424001Q, Approved
                          061097001Q, Approved
                          069321001Q, Select Status
                          068466001Q, Approved
                          069305001Q, Approved
                          069270001Q, Approved
                          069167001Q, Not Approved
                          068744001Q, Approved
                          068677001Q, Approved
                          066497001Q, Approved
                          068677001Q, Not Approved

                          _______________ ________



                          <HTML>



                          <head>





                          <Title>

                          Scene Double Repair Lab

                          </Title>


                          <style type="text/css">



                          ul#split,ul#spl it li{margin:0;pad ding:0;list-style:none}
                          ul#split li{float:CENTER ;width:1100px;m argin:0 10px 10px 0}
                          ul#split h3{font: normal 90%/1.0 Verdana,sans-serif;
                          text-transform:upper case;margin:0px ;padding: 5px 5px
                          5px;text-align:CENTER;co lor: #000}
                          ul#split p{margin:0;padd ing:5px 8px 5px}
                          ul#split div{background: #C5E6F6}
                          li#one h3{background: #C8C866}
                          li#two h3{background: #FFBD00}
                          li#three h3{background: #E3A1C4}

                          </style>
                          <script type="text/javascript" src="niftycube. js"></script>
                          <script type="text/javascript">
                          window.onload=f unction(){
                          Nifty("ul#split h3","top");
                          Nifty("ul#split div","bottom same-height");
                          Nifty("div#box" ,"big");
                          }
                          </script>


                          </head>


                          <BODY bgcolor="#FFFFC C">







                          <center>


                          <font face="Arial, Helvetica, sans-serif" size="4"><b><U> Scene Double
                          Repair Lab as at 25/10/2006 17:40:19 GMT</U></b><br><< Repairs Awaiting
                          Approval >></font><br><br>Ei ther CLICK on your PO# to view individual
                          cost conversions or use converter below.<br>
                          <a href="#"
                          onclick="window .open('http://www.ozforex.com .au/tools/customConvert.a sp?NC_ID1=GBP&N C_ID2=USD&BG=1C 8CB3&amount=0&l =www.ozforex.co m.au/images/tools/fxTranzfers.gif ','ozforexWin', 'toolbar=no,men ubar=no,scrollb ars=no,resizabl e=no,status=no, location=no,dir ectories=no,cop yhistory=no,dep endent=0,height =360,width=250' );
                          return false;" onMouseOver="st atus='Launch Sample'; return true"
                          onMouseOut="sta tus='';return true"><font face="Arial, Helvetica,
                          sans-serif" size="4">Launch Currency Converter</a><br><br>


                          <ul id=split><li id=one><h3>-- Repairs currently in progress at Scene
                          Double --</H3><div><form name=Approval method=post
                          action=processe mail_approval.a sp><table><tr>< td align=center><b >Your
                          PO#</TD><td>&nbsp;&n bsp;&nbsp;</td><TD align=center><b >Part
                          Code</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center><b >Serial
                          Number</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center><b >Status</td><td align=center><b >Charge</td></tr><tr><td
                          align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 82>070512001R</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U1009A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>No Serial Number</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Unkn own Cause</B></td><td
                          align=LEFT>Awai ting</B></td><TD><input type = hidden name = 1 value =
                          070512001R><sel ect name=1><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr>
                          <td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 78>069435001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U1002A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>04 06137398</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Remo te unit dip switch mounted upside down !</B></td><td
                          align=LEFT>FOC</B></td><TD><input type = hidden name = 2 value =
                          069435001Q><sel ect name=2><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 81>069424001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U2009A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>01 06129137</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Defe ctive remote board</B></td><td
                          align=LEFT>Awai ting</B></td><TD><input type = hidden name = 3 value =
                          069424001Q><sel ect name=3><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 80>069321001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U4222A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>04 06137568</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Unkn own Cause</B></td><td align=LEFT>£5</B></td><TD><input
                          type = hidden name = 4 value = 069321001Q><sel ect
                          name=4><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 73>069305001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U1028A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>07 05109928</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Unkn own Cause</B></td><td align=LEFT>£5</B></td><TD><input
                          type = hidden name = 5 value = 069305001Q><sel ect
                          name=5><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 74>069270001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U4222A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>05 06140511</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Unkn own Cause</B></td><td align=LEFT>£10</B></td><TD><input
                          type = hidden name = 6 value = 069270001Q><sel ect
                          name=6><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 79>069167001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U1002A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>01 06128955</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Wron g power jack fitted</B></td><td
                          align=LEFT>FOC</B></td><TD><input type = hidden name = 7 value =
                          069167001Q><sel ect name=7><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 70>068744001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U3009A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>07 05112426</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Unkn own Cause</B></td><td align=LEFT>£5</B></td><TD><input
                          type = hidden name = 8 value = 068744001Q><sel ect
                          name=8><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 75>068677001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U3001A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>05 06139850</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Remo te surge diode blown</B></td><td
                          align=LEFT>£5</B></td><TD><input type = hidden name = 9 value =
                          068677001Q><sel ect name=9><option> Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 76>068677001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U3001A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>05 06139883</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Remo te surge diode blown</B></td><td
                          align=LEFT>£5</B></td><TD><input type = hidden name = 10 value =
                          068677001Q><sel ect name=10><option >Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 72>068466001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U1008A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>10 05</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>Remo te
                          unit VGA output amps ALL blown by something user connected
                          !!</B></td><td align=LEFT>£50</B></td><TD><input type = hidden name =
                          11 value = 068466001Q><sel ect
                          name=11><option >Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 77>066497001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U4001A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>03 06135594</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Bad Remote RJ45</B></td><td
                          align=LEFT>FOC</B></td><TD><input type = hidden name = 12 value =
                          066497001Q><sel ect name=12><option >Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr><td align=center><A
                          HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 71>061097001Q</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>AC U3001A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=center>12 05125052</td><td>&nbsp;&n bsp;&nbsp;</td><td
                          align=left>Loca l surge diode blown</B></td><td
                          align=LEFT>£5</B></td><TD><input type = hidden name = 13 value =
                          061097001Q><sel ect name=13><option >Approved</option><option> Not
                          Approved</option><option> Scrap at your location</option><option> Select
                          Status</option></select></TD</tr></TABLE></div></LI></UL><input
                          type=reset name=Reset value=Reset><in put type=submit name=Submit
                          value=Submit></form>



                          </font>
                          </body>

                          </html>

                          Comment

                          • Mike Brind

                            #14
                            Re: Form to Email


                            "David" <davidgordon@sc ene-double.co.ukwro te in message
                            news:1161794686 .281181.195720@ m7g2000cwm.goog legroups.com...
                            ok, I have dynamically given the <SELECTTAG a new name on each loop,
                            i.e. 1, 2, 3, 4, 5
                            as follows:
                            As it stands, I have managed to create the following in my email body:
                            How can I replace the ',' with '=' and how can I remove 'Submit' from
                            the forms collection.
                            Evertjan answered this in the other thread you started


                            <snip>
                            <ul id=split><li id=one><h3>-- Repairs currently in progress at Scene
                            Double --</H3><div><form name=Approval method=post
                            action=processe mail_approval.a sp><table><tr>< td align=center><b >Your
                            PO#</TD><td>&nbsp;&n bsp;&nbsp;</td><TD align=center><b >Part
                            Code</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center><b >Serial
                            Number</td><td>&nbsp;&n bsp;&nbsp;</td><td
                            align=center><b >Status</td><td align=center><b >Charge</td></tr><tr><td
                            align=center><A
                            HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=21 82>070512001R</a></td><td>&nbsp;&n bsp;&nbsp;</td><td
                            align=center>AC U1009A</td><td>&nbsp;&n bsp;&nbsp;</td><td
                            <snip rest of garbled html>

                            When you response.write html, put a few judicious vbcrlfs in. Otherwise you
                            get a load of junk which is nearly impossible to debug/decipher. I for one
                            would sooner stick pins in my eyes than plough through that lot.


                            Comment

                            • Ray Costanzo [MVP]

                              #15
                              Re: Form to Email

                              If your ASP code shows up in your browser, how on Earth are you submitting
                              the form and having anything happen?

                              This is how ASP works:

                              Server sees this:

                              <%
                              Response.Write "<div>hi</div>
                              %>

                              Browser receives this:

                              <div>hi</div>

                              You will NOT see ASP code in the browser if you are loading the page
                              properly, i.e. http://.....yourpage.asp



                              Ray at work

                              "David" <davidgordon@sc ene-double.co.ukwro te in message
                              news:1161789677 .789154.289370@ b28g2000cwb.goo glegroups.com.. .
                              That is what I did ? as most of the html is written out by
                              response.write statements
                              >
                              RESPONSE.WRITE "<div><form name=Approval method=post
                              action=processe mail_approval.a sp>"
                              >
                              asp ......
                              >
                              >
                              >
                              response.write "<td align=center><A
                              HREF=BBUSA_Repa ir_Lab_Datachec k.asp?SDLink=" & RS("ReportID") & ">" &
                              ref & "</a></td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & part &
                              "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=center>" & serial &
                              "</td><td>&nbsp;&n bsp;&nbsp;</td><td align=left>" & cause &
                              "</B></td><td align=LEFT>" & money & "</B></td><TD>" & FD &
                              "</TD><input TYPE=hidden name=PO VALUE=" & ref & "></tr>"
                              >
                              end if
                              >
                              rs.movenext
                              >
                              Loop
                              >
                              end if
                              >
                              >
                              RESPONSE.WRITE "</TABLE></div></LI></UL><input type=reset name=Reset
                              value=Reset><in put type=submit name=Submit value=Submit></form>"
                              >

                              Comment

                              Working...