navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

drw results in one form field

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> drw results in one form field
Page: [1]
 
Joey

 

Posts: 167
Joined: 5/15/2002
From:
Status: offline

 
drw results in one form field - 2/10/2008 20:31:28   
I'm trying to get all of my drw results into one form field, if i use a text field in the drw it makes different rows, i need all of the results in one field.

any suggestions?
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: drw results in one form field - 2/10/2008 20:44:56   
You could set a variable. Then add all the DRW data to the variable. Then set the variable tot he field:

<%DIM myTextData
myTextData = ""%>

Then inside the DRW:

<%myTextData = myTextData & P_FieldVal(fp_rs,"Field1")
myTextData = myTextData & P_FieldVal(fp_rs,"Field2")
'etc, etc.
%>

Then your text field like so:

<textarea name="myText"><%=myTextData%></textarea>

Something like that maybe?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Joey)
Joey

 

Posts: 167
Joined: 5/15/2002
From:
Status: offline

 
RE: drw results in one form field - 2/10/2008 23:03:20   
Thanks Roger

That is close, it is showing one email in the first row, two in the second, and 3 so on.

it adds text boxes and for each record it adds the rows above. i just need one row with all drw results in one text box.

i also need to insert a comma between email addresses.

can you help me with those 2 issues?

thanks

joey

(in reply to Joey)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: drw results in one form field - 2/11/2008 8:59:15   
Can you post the code you're using?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Joey)
Joey

 

Posts: 167
Joined: 5/15/2002
From:
Status: offline

 
RE: drw results in one form field - 2/11/2008 10:42:54   
<%DIM myTextData 
myTextData = ""%> 

<head>
<meta http-equiv="Content-Language" content="en-us">
</head>

<table width="100%" border="1">
	<thead>
		<tr>
			<th ALIGN="LEFT"><b>EmailAddress</b></th>
		</tr>
	</thead>
	<tbody>
		<!--#include file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM recd_messages"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="test"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&EmailAddress=202&Message=202"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<%myTextData = myTextData & FP_FieldVal(fp_rs,"EmailAddress")%> 
<tr>
			<td>
			<form method="POST" action="test2.asp">
	<table border="1" width="100%">
		<tr>
			<td>Phone Number (s)</td>
			<td><textarea name="myText" rows="8" cols="39"><%=myTextData%></textarea></td>
		</tr>
		<tr>
			<td>Message:</td>
			<td><textarea rows="3" name="Message" cols="39"></textarea></td>
		</tr>
		<tr>
			<td> </td>
			<td><input type="submit" value="Submit" name="B2"></td>
		</tr>
	</table>
				<p> </p>
			</form>
			</td>
		</tr>
		<!--#include file="../_fpclass/fpdbrgn2.inc"-->

(in reply to Joey)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: drw results in one form field - 2/11/2008 14:25:23   
To include all the DB fields in 1 form field, I had something like this in mind:

<%DIM myTextData
myTextData = ""%>

		<!--#include file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM recd_messages"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="test"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&EmailAddress=202&Message=202"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<%myTextData = myTextData & FP_FieldVal(fp_rs,"EmailAddress") & ";"%> 
		<!--#include file="../_fpclass/fpdbrgn2.inc"-->
			<form method="POST" action="test2.asp">
	<table border="1" width="100%">
		<tr>
			<td>Combined Text</td>
			<td><textarea name="myText" rows="8" cols="39"><%=myTextData%></textarea></td>
		</tr>
		<tr>
			<td>Message:</td>
			<td><textarea rows="3" name="Message" cols="39"></textarea></td>
		</tr>
		<tr>
			<td> </td>
			<td><input type="submit" value="Submit" name="B2"></td>
		</tr>
	</table>
			</form>


What I have there should put all the field "EmailAddress" in the form field "myText" (separated by semi-colons if you notice) and leave the textbox "Message" blank.

Is that what you had in mind: something like that? Notice I put the form *outside* the DRW.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Joey)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> drw results in one form field
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts