472,336 Members | 1,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,336 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 2226
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...
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...
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...
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...
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...
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...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.