RE: [PHP-DB] PHP in a javascript function with DB calls.

2002-09-10 Thread Ryan Jameson (USA)

A bit of a strange way would be to always pop the window and at that point have the 
PHP decide what to put in there. If there is not offer you want to include you could 
simply thank them, or you could even produce an inline window.close(); javascript 
call. The only problem with that is that some browsers pop a message saying that the 
script is trying to close the window. I'd expect you to know upon hitting the checkout 
screen what you'd want to do so you could do the processing there and have the code 
decide whether to even pop the window.

Hope it's worth a cent or 2... :-)

<>< Ryan

-Original Message-
From: Petr Tomenendál [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP in a javascript function with DB calls.


Hi.
You cannot call PHP script from JavaScript in any simple way.
It can be possibly done by including JavaScript code generated
by PHP script through 

Re: [PHP-DB] PHP in a javascript function with DB calls.

2002-09-10 Thread Petr Tomenendál

Hi.
You cannot call PHP script from JavaScript in any simple way.
It can be possibly done by including JavaScript code generated
by PHP script through 

Re: [PHP-DB] PHP in a javascript function with DB calls.

2002-09-10 Thread Adam Voigt

Umm, the body tag in HTML has an onLoad parameter.
So:



That code for the window.new is probably wrong, but that will do it.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-09-10 at 11:20, Aaron Wolski wrote:
> Hi All,
> 
> I HOPE this is the right place for this.. if not I am sorry!!!
> 
> 
> 
> I'm hoping someone can put me on a clear path of how to do what I am
> asking here.
> 
> I Have a shopping cart... and in this shopping cart I want to feature
> some items in a pop_up window when the user is ready to check out - if
> they are not already selected.
> 
> For example.. Someone buy a Hockey Stick but don't buy hockey tape..
> 
> when when they go to check out.. I want a pop_up to be launched asking
> the user if they want to add Hockey tape to their order for onlu $$$.
> 
> For this to happen I need to have an onLoad on the checkout page that
> calls a javascript function that has PHP code to find out IF a
> paritcular product is selected to see if the other has been selected
> too, if it's NOT selected then launch the pop_up.
> 
> Does ANYONE have any idea's as to how this can be accomplished??
> 
> Anyhelp is appreciated
> 
> thanks all.
> 
> Aaron
> 



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