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 <script src="script.php"..., but it is too
complicated. 

I think it will be better to do this like this:

user have selected some items and goes to check out - his browser
requests new page with check out form for example checkout.php - 

your checkout.php can look like this:
<html>
<head>
</head>
<body>
<!-- test for related items (hockey stick - hockey tape) -->
<!-- your checkout code here -->
</body>
</html>

in part 'test for pop-up' you will check for items related to
currently selected items, and if your script find some items then
you can echo JavaScript code to open new window with additional items to
buy or show these items on the top of page before the checkout form. 

I hope this helps.

Petr.


On Tue, 2002-09-10 at 17: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

Reply via email to