OK Tom - that script worked beautiful.

there are a few different applications that I need this for, and I'm
wondering if you can either help me with the coding, or refer me to a
webpage that can get me started in the right direction.

I need to collect a value that will be used in a query.  (assuming this is
pretty easy - just use the value listed in post for this form)
 I also need an OK / Cancel option that I can use a die with if the cancel,
or proceed if they select OK.

when I use this java script does this reload the page, and go back to the
top, or does it simply set the $_POST value?

Jeff
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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 $_SERVER['PHP_SELF']?>"
method="post">
> TR>         <INPUT TYPE="HIDDEN" VALUE="" NAME="Message">
> TR>         <input type="button" value="go" 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
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to