Hi,
I have an asp page which I am designing.
On this page will be a set of records pulled from my db. These records
will be displayed within a form.
Each record will have a 'dropdown' displayed on the right hand side of
each record, so the user can select 'Approved' or 'Scrap' for each
seperate record.
I then want the user to be able to submit this form to us by email.
All I need to know is how to get the records with the selected answers
in the form into the body of the email ?
i.e.
Record1 xxxxx yyyyy ffff rrrrrr 'Approved'
Record2 xxxxx yyyyy ffff rrrrrr 'Approved'
Record3 xxxxx yyyyy ffff rrrrrr 'Scrap'
Record4 xxxxx yyyyy ffff rrrrrr 'Approved'
Record5 xxxxx yyyyy ffff rrrrrr 'Approved'
Record6 xxxxx yyyyy ffff rrrrrr 'Scrap'
Appreciate your help
Thanks
David. 5 1573
"David" <da*********@sc ene-double.co.ukwro te in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
Hi,
I have an asp page which I am designing.
On this page will be a set of records pulled from my db. These records
will be displayed within a form.
Each record will have a 'dropdown' displayed on the right hand side of
each record, so the user can select 'Approved' or 'Scrap' for each
seperate record.
I then want the user to be able to submit this form to us by email.
All I need to know is how to get the records with the selected answers
in the form into the body of the email ?
i.e.
Record1 xxxxx yyyyy ffff rrrrrr 'Approved'
Record2 xxxxx yyyyy ffff rrrrrr 'Approved'
Record3 xxxxx yyyyy ffff rrrrrr 'Scrap'
Record4 xxxxx yyyyy ffff rrrrrr 'Approved'
Record5 xxxxx yyyyy ffff rrrrrr 'Approved'
Record6 xxxxx yyyyy ffff rrrrrr 'Scrap'
The values of the "dropdown" (select lists) will be available in the
Request.Form collection. Put these in the body of your email.
For Each x in Request.Form
EmailBody = EmailBody & x & ": " & Request.Form(x) & "<br>" 'or vbCrLf
if text
Next
You will need to omit items that you don't want to include, such as the
submit button, from the collection within the loop.
--
Mike Brind
Thanks Mike,
I cannot seem to get this working:
For Each x in Request.Form
EmailBody = EmailBody & x & ": " & Request.Form(x) & "<br>" 'or vbCrLf
Next
The select statement on the form is <select name=select.... ........
What do I put in place of x ?
I need to print what is inside the form tags + the selected item in
each of the dropdowns.
Thanks again.
David
------------------------------------------------------------------------------
"David" <da*********@sc ene-double.co.ukwro te in message
news:11******** *************@e 3g2000cwe.googl egroups.com...
Thanks Mike,
I cannot seem to get this working:
For Each x in Request.Form
EmailBody = EmailBody & x & ": " & Request.Form(x) & "<br>" 'or vbCrLf
Next
The select statement on the form is <select name=select.... ........
What do I put in place of x ?
I need to print what is inside the form tags + the selected item in
each of the dropdowns.
How did you try to get it to work? What happened to suggest that it didn't
work?
The For... Next loop will iterate through the Form collection and print out
the name of the Request.Form item in place of x, and its value in place of
Request.Form(x) . You don't need to substitute x with anything.
Trying doing Response.Write instead of "EmailBody=Emai lBody &" to see what I
mean.
--
Mike Brind
Mike,
1/ Is there any way to remove the 'Submit' value from the forms
collection, as it appears in the middle of my data which I am
submitting via email.
2/ Also, is there any way to ORDER the forms collection data. I have
dynamically given the <selectobject a new name on each loop within my
form, but the results are not in any particular order. I have named
them '1' onwards, i.e. 2, 3, 4, 5
In my email, I get an order of , 2, 7, 6, 4, 8 etc .... each on their
own line
Appreciate your help
Thanks
David
David wrote on 25 okt 2006 in microsoft.publi c.inetserver.as p.general:
1/ Is there any way to remove the 'Submit' value from the forms
collection, as it appears in the middle of my data which I am
submitting via email.
<%
for x = 1 to Request.Form.co unt()
if Request.Form.ke y(x) <"Submit" then
Response.Write( Request.Form.ke y(x) & " = ")
Response.Write( Request.Form.it em(x) & "<br>")
end if
next
%>
Not tested, see < http://classicasp.aspfaq.com/forms/how-do-i-iterate-
through-a-form-collection.html >
There are also clientside options, but they are off topic here.
2/ Also, is there any way to ORDER the forms collection data. I have
dynamically given the <selectobject a new name on each loop within my
form, but the results are not in any particular order. I have named
them '1' onwards, i.e. 2, 3, 4, 5
There are lots of ways ordering a array.
Try:
Put the collectoion into an array.
Then use serverside Jscript sort()
In my email, I get an order of , 2, 7, 6, 4, 8 etc .... each on their
own line
This is an ASP NG, how you send your email under ASP [CDO, Jmail, etc.]
is completely at the merci of your programme.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jack |
last post by:
I'm setting up a form and want to check if some conditions are met when
the form submits. If they aren't, the form displays a missing field
message and the user has to go back to fill in the missing data. If it
is met, the form continues processing. I have the $state variable coming
from a drop down SELECT option with "" being the SELECTED default.
The if statements are included inside the form tags on the form page,
not on the...
|
by: John |
last post by:
Dear all,
It been more than 3 days I am trying to debug this program, I
interpret it using activePerl and it is giving (perl -wc
code_process.pl) no error syntax but when I put it online, change to
the appropriate mode and test the html form it gave me an 500 internel
server error.
I really need it to be done soon, I would not post here before I test
it as much as I can,
|
by: Steven O. |
last post by:
I am basically a hobbyist programmer, at the moment doing a little
work experimenting with some AI stuff. I learned C++, and then tried
to teach myself MFC using MS Visual C++ 6.0. I swore off of MFC,
which was a nightmare, and have been playing with Borlands C++
Builder. In C++ Builder, creating forms and other GUI elements is
much simpler than MFC, very similar to Visual Basic.
In the store yesterday, I was looking at the C++ .Net...
|
by: nospam_stunter2001 |
last post by:
Hi folks,
I'm new here and am a neophyte Access 2000 user/developer. A year
ago, I barely knew what Access was. I was asked by the people that
pay us to begin keeping certain data about the children's crisis
program I manage. After a couple of years doing this by hand on paper
(Yikes!), I decided that this was ridiculous. Out of neccessity, I
had to learn Access and develop a database to track clients and
services. So what I know, I've...
|
by: Kathy |
last post by:
What is the standard technique for handling the fields in the following
scenario on a continuous form?
Multiple Divisions. Each Division has multiple Buildings. Each Building has
a Supervisor.
Tables: (abbreviated)
TblDivision
DivisionID
| |
by: julie.siebel |
last post by:
Hello all!
As embarrassing as it is to admit this, I've been designing db driven
websites using javascript and vbscript for about 6-7 years now, and I
am *horrible* at form validation.
To be honest I usually hire someone to do it for me, grab predone
scripts and kind of hack out the parts that I need, or just do very
minimal validation (e.g. this is numeric, this is alpha-numeric, etc.)
|
by: whyyyy |
last post by:
The script below works fine if the form is filled out and submitted.
But a (blank) e-mail is sent whenever the page loads, even when the form is
not submitted. I would like to receive the e-mail only when the form is
submitted
<%@LANGUAGE="VBSCRIPT"%>
<%
Set MyMail=CreateObject("CDO.Message")
|
by: Jerim79 |
last post by:
I need to create a form that takes a number that the user enters, and
duplicates a question the number of times the user entered. For
instance, if the customer enters 5 on the first page, when they press
next the form generates "How old are you?" 5 times on the page. The
customer will answer all 5 questions then press next. Finally, all the
local variables get dynamically created and written to a database.
I have already taken care of...
|
by: klenwell |
last post by:
Another request for comments here.
I'd like to accomplish something like the scheme outlined at this page
here:
http://tinyurl.com/3dtcdr
In a nutshell, the form uses javascript to hash (md5) the password
field using a random one-time salt (nonce) -- generated by php and
pasted in the form -- that is then posted with the hashed password
|
by: jerrydigital |
last post by:
Hello, I am new to this forum but have read several posts and I thank you for your great assistance. I am stumped right now. I have a user registration form in asp that is set to a form method=registration.asp page. i will post my registration.asp page below.
I am hoping this asp page will connect to my access database called registration.mdb with a table called registration. however, everytime i submit my registration information, I...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |