Re: Getting the value from a not posted form edit Vield.
| From: | Richard Lynch | Date: | Sat, 22 Sep 2001 04:01:17 +0000 |
| Subject: | Re: Getting the value from a not posted form edit Vield. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68270@lists.php.net to get a copy of this message | ||
You simply CANNOT get an INPUT to go through an <A> tag.
If you want to keep the INPUT, you either need to use a SUBMIT or an INPUT
TYPE=IMAGE.
*OR* you can simply incorporate aFindOnInput into your <A> tag, if it's not
something the user can edit:
echo "<a href='../PhPScrips/ODiseaseFind.php4?aFindOnInput=",
URLEncode($aFindOn), "' target=mainFrame name=disease">Search</A>
I'm assuming mainFrame is actually defined somewhere... It's not in the
source you posted.
Actually, using JavaScript, you *might* be able to use onClick in the <A>
tag, and snag the data out of the INPUT, and pass that on... But relying on
JavaScript to do that will lose some users.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Hvm <hvm@amulet-software.net>
Newsgroups: php.general
To: <php-general@lists.php.net>
Sent: Friday, September 21, 2001 7:08 AM
Subject: Getting the value from a not posted form edit Vield.
Hi All,
Has some one a solution for a non posted field to get the entered
information out in to the session variables.
My code:
1e The script "adv_search_dis.php4" is to build the input field.
<?php
echo "<INPUT type='text' name=aFindOnInput value='$aFindOn' size=15
maxlength=15 style='font-family:
Arial, Helvetica, sans-serif; color: black; background:
#DFFFFD'></td>";
// Find the diseases via Link
echo "<a href='../PhPScrips/0DiseaseFind.php4' target='mainFrame'
name='disease'>Search</a></FONT>";
?>
2e The script "0DiseaseFind.php4" is to get the variable $aFindOnInput from
the "adv_search_dis.php4" script in to the session variable and start a new
script to build the result found in to the database.
<?php
$aFinfOn = Getenv($aFindOnInput);
$aLetter = $aFinfOn;
echo "<FRAMESET rows='50, *' FRAMEBORDER='NO' BORDER='0'
FRAMESPACING='0'>";
echo "<FRAME NAME='topFrame' SRC='../PhPScrips/a.php4'
FRAMEBORDER='NO'
SCROLLING='NO' NORESIZE MARGINHEIGHT='22'>";
echo "<FRAME NAME='abc results' SRC='../PhPScrips/GetLSDNs.php4'
FRAMEBORDER='NO' SCROLLING='AUTO' NORESIZE>";
?>
Any help?
Yours Hans.