I'd say you've already determined the simplest way to do it. 
When the page is generated by PHP, have it insert the 
necessary data into appropriate places in a javascript function.

When a user clicks the 'recharge' button, they are prompted for
the amount they wish to use to recharge, and then are shown another
javascript pop-up confirming the changes. The javascript function
then refreshes the calling page, with the appropriate values,
using one of the functions Ernest mentioned.

When you say "it can take sometime for this page load at times",
do you mean that all page requests take a while sometimes, or simply
that page because of the amount of data it shows, and certain processing
that needs to be done in order to display that page?

If it's the latter, then you could redirect the user to a much
simpler page for the purposes of recharging their card, and do away
with javascript completely (which means you don't have to worry
about people disabling javascript).

-Mark


----- Original message -----
From: "Jeff Bluemel" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Mon, 18 Nov 2002 17:24:52 -0700
Subject: Re: [PHP] is this not possible?

here's the URL if case somebody decides to look at it;

http://obi-wan.domintcom.com
user: guest
pass: domintcom

go to customer service, prepaid pin, and then look up 3077876962  -
activate, deactivate, and recharge

this is for customer service of prepaid phone cards.

now - when I reload this page to refresh the information sometimes it can
really take awhile.

I need to somehow get the information from the user on how much to
recharge
the pin for.  now, before I refresh the page I need to get how much the
user
wants to recharge, process the recharge, and then refresh the page that
all
of this started on.

I thought it would be the simplest if I could somehow use javascript to
prompt the user for a value, confirm if the user wants to recharge
xxxxxxxxx
pin for $xx.xx, recharge the pin, and then refresh the calling page so it
now reflects the new balance.

I don't want to refresh original page until this is all done because it
can
take sometime for this page load at times.

is everybody lost now?

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 22:39 18.11.2002, Jeff Bluemel spoke out and said:
> --------------------[snip]--------------------
> >I'm been ignored on this question for 4-5 days now.  even if it is not
> >possible could somebody please verify this?
> >
> >is it possible to pass a variable from javascript directly to php WITHOUT
> >using either a link, or a form submit to pass the variables?  I've gotten
a
> >work around to call an image that's actually a php file, but run my
script,
> >and then return an image file.
> >
> >is this the only way?
> --------------------[snip]--------------------
>
> Generally spoken, yes - the browser needs to pass the data back to the
> server somehow.
>
> What are you really up to? Do you want to transmit data to the server
> without the user clicking on a link or a button?
>
> You can always use JavaScript to submit a form (even a hidden-only form),
> or to reload the document with the same or a different URL.
>
> URL-Reload:
>
> document.location.href = url;
>
> Form submit:
>
> document.forms[formname].submit();
>
>
> --
>    >O Ernest E. Vogelsinger
>    (\) ICQ #13394035
>     ^ http://www.vogelsinger.at/
>



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



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

Reply via email to