Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Funky input methods...

Reply
Thread Tools

Funky input methods...

 
 
Me
Guest
Posts: n/a
 
      07-23-2005
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.
 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      07-23-2005
"Me" wrote in message news:dbsgph$2nan$(E-Mail Removed)...
: 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:

Hopefully this is on a postback but you need to change this one line:

if request.form("MaidenName") > "" then

should be:

if request.form("MaidenName") <> "" then
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Funky address change. =?Utf-8?B?VHJhY3k=?= ASP .Net 3 03-16-2006 04:58 PM
Funky P-t-P T1, SBC says I have a timing problem, I say BS... Doug Cisco 4 07-25-2004 02:14 AM
Address Book is Funky Peter Arnold Firefox 1 07-13-2004 12:57 PM
DNS funky when using Cisco IOS w/ IPFW Brian Bergin Cisco 0 02-02-2004 01:06 PM
Funky error Situation Diogenes Dilone ASP .Net 3 01-07-2004 04:12 PM



Advertisments