Re: Re[2]: [PHP] inputbox?
| From: | Jeff Bluemel | Date: | Wed, 02 Oct 2002 02:12:35 +0000 |
| Subject: | Re: Re[2]: [PHP] inputbox? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118499@lists.php.net to get a copy of this message | ||
Tom,
I am going to work with this command, and see if I can get it to work.
Thanks,
Jeff
"Tom Rogers" <trogers@kwikin.com> wrote in message
news:11766568270.20021002120155@kwikin.com...
> Hi,
>
> Wednesday, October 2, 2002, 11:52:34 AM, you wrote:
> TR> Hi,
>
> TR> Tuesday, October 1, 2002, 1:36:43 PM, you wrote:
> JB>> is there a way to for an input box to come up looking for a value? I
know
> JB>> there are a few ways I could resolve my current issue, but I would
prefer to
> JB>> display an inputbox, and use that value in my query.
>
> JB>> basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of
a
> JB>> form, but then I would have to get a value to pass to the query.
this would
> JB>> be for prepaid phone cards. if somebody selected to recharge then I
would
> JB>> like an input box to be displayed asking the amount they would like
to
> JB>> recharge.
>
> JB>> --
> JB>> Jeff Bluemel
>
> TR> You need something like this:
>
> TR> <head>
> TR> <script language="JavaScript">
> TR> function ask(){
> TR> if(document.form1.Message.value = prompt('Name',''))
> TR> form1.submit();
> TR> }
> TR> </script>
> TR> <head>
> TR> </head>
> TR> <form name="form1" action="<?echo
> TR> $_SERVER['PHP_SELF']?>"
method="post">
> TR> <INPUT TYPE="HIDDEN" VALUE=""
> TR> NAME="Message">
> TR> <input type="button" value="go"
> TR> onclick="ask();">
> TR> </form>
>
> TR> --
> TR> regards,
> TR> Tom
>
> One too many heads...revised code:
>
> <head>
> <script language="JavaScript">
> function ask(){
> if(document.form1.Message.value = prompt('Name',''))
> form1.submit();
> }
> </script>
> </head>
> <form name="form1" action="<?echo
> $_SERVER['PHP_SELF']?>" method="post">
> <INPUT TYPE="HIDDEN" VALUE="" NAME="Message">
> <input type="button" value="go" onclick="ask();">
> </form>
>
> --
> regards,
> Tom
>