473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Text Field

I need to make a text field equal to the entered value. Example:
First time to the page nothing will show up in the field because
nothing was entered. I enter a value and submit the form. The
redirect is to the same page to add new inforation but this time the
value entered in that one text field will be there.

I tried <%=Request.Form("box")%as the value of the text field but to
no success. Anyone have some input??

Nov 9 '06 #1
5 2282
you said you use a redirect?
or do you mean form submittal?

if form submittal
<%
dim x2, x3
x3=""
x2=0
if request.form("Submit") = "Submit" then ' this is the submit button
x2=1
x3= request.form("box")
end if
%>
<input name="box" value="<% if x2=1 then response.write x3 %>">
"Mangler" <dw******@directwireless.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
I need to make a text field equal to the entered value. Example:
First time to the page nothing will show up in the field because
nothing was entered. I enter a value and submit the form. The
redirect is to the same page to add new inforation but this time the
value entered in that one text field will be there.

I tried <%=Request.Form("box")%as the value of the text field but to
no success. Anyone have some input??

Nov 9 '06 #2
Mangler wrote on 09 nov 2006 in microsoft.public.inetserver.asp.general:
I need to make a text field equal to the entered value. Example:
First time to the page nothing will show up in the field because
nothing was entered. I enter a value and submit the form. The
redirect is to the same page to add new inforation but this time the
value entered in that one text field will be there.

I tried <%=Request.Form("box")%as the value of the text field but to
no success. Anyone have some input??
if your html was:

<form method='post'>
<input name='box' value='<%=Request.Form("box")%>'>
<input type='submit'>
</form>

it should work.

However if you used a querystring, you would need this:

<form>
<input name='box' value='<%=Request.Querystring("box")%>'>
<input type='submit'>
</form>

Tested.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 9 '06 #3
It doesnt work. I must be doing something wrong here. Below is my
form (scaled down to not take up alot of space) When the form submits,
the form action goes back to the same page displaying what was just
entered. From there aonther record with the same box number can be
created.
<form action="<%=MM_editAction%>" method="POST" name="frmrec"
id="frmrec"
onsubmit="MM_validateForm('recdte2','','R','box',' ','RisNum','boxqty','','RisNum','recqty2','','RisN um','recini2','','R');return
document.MM_returnValue">
<table width="100%" border="0" align="center" cellpadding="6"
cellspacing="0" class="dot">
<tr>
<td width="10%"><select name="part" id="part">
<option selected="selected">Select Part</option>
<option value="A">A</option>
</select></td>
<td width="16%"><input name="recdte" type="text" id="recdte"
value="<%=FormatDateTime(Now, 2)%>" /></td>
<td width="8%">Box#
<input name="box" type="text" id="box" size="4"
value="<%Request.Form("box")/>
</td>
<td width="12%">Box Quantity
<input name="boxqty" type="text" id="boxqty" size="5" /></td>
<td width="25%">Quantity Reclaimed
<input name="recqty" type="text" id="recqty2" /></td>
<td width="13%"><input name="recini" type="text" id="recini2"
value="<%=(rsI.Fields.Item("ini").Value)%>" /></td>
<td width="16%"><input type="submit" name="Submit"
value="Update" />
<input name="hdnidlot" type="hidden" id="hdnidlot"
value="<%=(rsS.Fields.Item("idlot").Value)%>" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="frmrec">
</form>

Nov 9 '06 #4

"Mangler" <dw******@directwireless.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
It doesnt work. I must be doing something wrong here. Below is my
form (scaled down to not take up alot of space) When the form submits,
the form action goes back to the same page displaying what was just
entered. From there aonther record with the same box number can be
created.
<form action="<%=MM_editAction%>" method="POST" name="frmrec"
id="frmrec"
onsubmit="MM_validateForm('recdte2','','R','box',' ','RisNum','boxqty','','Ri
sNum','recqty2','','RisNum','recini2','','R');retu rn
document.MM_returnValue">
<table width="100%" border="0" align="center" cellpadding="6"
cellspacing="0" class="dot">
<tr>
<td width="10%"><select name="part" id="part">
<option selected="selected">Select Part</option>
<option value="A">A</option>
</select></td>
<td width="16%"><input name="recdte" type="text" id="recdte"
value="<%=FormatDateTime(Now, 2)%>" /></td>
<td width="8%">Box#
<input name="box" type="text" id="box" size="4"
value="<%Request.Form("box")/>
Miss '=' here me thinks
</td>
<td width="12%">Box Quantity
<input name="boxqty" type="text" id="boxqty" size="5" /></td>
<td width="25%">Quantity Reclaimed
<input name="recqty" type="text" id="recqty2" /></td>
<td width="13%"><input name="recini" type="text" id="recini2"
value="<%=(rsI.Fields.Item("ini").Value)%>" /></td>
<td width="16%"><input type="submit" name="Submit"
value="Update" />
<input name="hdnidlot" type="hidden" id="hdnidlot"
value="<%=(rsS.Fields.Item("idlot").Value)%>" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="frmrec">
</form>

Nov 9 '06 #5
Mangler wrote on 09 nov 2006 in microsoft.public.inetserver.asp.general:
It doesnt work. I must be doing something wrong here. Below is my
form
Please always quote on usenet, this is not email.

I wrote earlier:
if your html was:

<form method='post'>
<input name='box' value='<%=Request.Form("box")%>'>
<input type='submit'>
</form>

it should work.

However if you used a querystring, you would need this:

<form>
<input name='box' value='<%=Request.Querystring("box")%>'>
<input type='submit'>
</form>

Tested.
Did you try the above?
Do you mean that the above "does not work"?

If we, after response to that, want to discuss your code,
please scale it down excluding all irrelevant code,
like the table elements, but do not include values that are
not specified in code.

... and always explain what "does not work" means,
and what you did debugging and what the debugging results were.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
2
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
3
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
5
by: simon_s_li | last post by:
Hi, I have 5 fields in line where I need to drag and drop the text from one field to another field and then all the fields need to re-order themselves. So for instance if I drag the text in...
2
by: JohnR | last post by:
When creating an msAccess db within the Access UI itself the fields that are text are NOT padded with blanks. For example, if I have a 10 char field and put in "HI" and then when I come back to...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
3
by: dugald.morrow | last post by:
I have some javascript that updates the text in a text field after certain actions take place such as clicking a checkbox. The javascript works fine in Safari and Firefox, but in IE, the text in...
1
DebadattaMishra
by: DebadattaMishra | last post by:
Introduction In case of rich applications, you must have observed that a text field behaves like a dynamic combo box. When the user enters some characters in the text field, a popup will come up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.