M
Me
Any of you guys got a clue of how to assign a value from one input
box to another hidden input? What I'm trying to do is take inputs for
names on a registration page. You've got first, middle, last, and maiden
name inputs, but in the database you've got first, middle, last, maiden,
and displayed last name columns. The object is to have the page sample
the maiden name input and if there's anything in that input text box, it
should write that value to the displayed last name column, and if it's
empty it should write value of the last name input text box to the
displayed last name column. The object is to have "Melissa Porker" who
we all knew and loved in high school as "Melissa Petite" (now married to
Piggly Porker) to display as "Melissa Petite" on the web site so all of
her classmates will recognize her name (even if they don't recognize her
picture
), while displaying "Melissa Ethridge" as "Melissa
Ethridge" cuz she never got married. I've tried the following route but
it refuses to work:
<table>
<tr>
<td>Last Name</td><td><input type="text" name="LastName"></td>
</tr>
<tr>
<td>First Name</td><td><input type="text" name="FirstName"></td>
</tr>
<tr>
<td>Middle Name</td><td><input type="text" name="MiddleName"></td>
</tr>
<tr>
<td>Maiden Name</td><td><input type="text" name="MaidenName">
<%
dim DNVar
if request.form("MaidenName") > "" then
DNVar = request.form("MaidenName")
else
DNVar = request.form("LastName")
end if
%>
<input type="hidden" name="DisplayedName" value="<%= DNVar>"></td>
</tr>
</table>
This won't do it. It always returns null for the hidden input
"DisplayedName" unless I assign DNVar a constant. If I assign a constant
to DNVar, it'll write that to the database just fine. Would anyone
happen to have any ideas how to to do this in a way that, umm... might
actually work? LOL.
box to another hidden input? What I'm trying to do is take inputs for
names on a registration page. You've got first, middle, last, and maiden
name inputs, but in the database you've got first, middle, last, maiden,
and displayed last name columns. The object is to have the page sample
the maiden name input and if there's anything in that input text box, it
should write that value to the displayed last name column, and if it's
empty it should write value of the last name input text box to the
displayed last name column. The object is to have "Melissa Porker" who
we all knew and loved in high school as "Melissa Petite" (now married to
Piggly Porker) to display as "Melissa Petite" on the web site so all of
her classmates will recognize her name (even if they don't recognize her
picture
Ethridge" cuz she never got married. I've tried the following route but
it refuses to work:
<table>
<tr>
<td>Last Name</td><td><input type="text" name="LastName"></td>
</tr>
<tr>
<td>First Name</td><td><input type="text" name="FirstName"></td>
</tr>
<tr>
<td>Middle Name</td><td><input type="text" name="MiddleName"></td>
</tr>
<tr>
<td>Maiden Name</td><td><input type="text" name="MaidenName">
<%
dim DNVar
if request.form("MaidenName") > "" then
DNVar = request.form("MaidenName")
else
DNVar = request.form("LastName")
end if
%>
<input type="hidden" name="DisplayedName" value="<%= DNVar>"></td>
</tr>
</table>
This won't do it. It always returns null for the hidden input
"DisplayedName" unless I assign DNVar a constant. If I assign a constant
to DNVar, it'll write that to the database just fine. Would anyone
happen to have any ideas how to to do this in a way that, umm... might
actually work? LOL.