Re: [PHP] related products, how to's best practices
From: Ajai Khattri (ajai_at_bway.net)
Date: 12/04/03
- Next message: Chris W. Parker: "RE: [PHP] related products, how to's best practices"
- Previous message: Eduardo R. Maciel: "Re: [PHP] Problem with references"
- Maybe in reply to: Richard Davey: "Re: [PHP] related products, how to's best practices"
- Next in thread: Justin French: "Re: [PHP] related products, how to's best practices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 4 Dec 2003 12:29:56 -0500 To: php-general@lists.php.net
On Thu, Dec 04, 2003 at 03:43:53PM +0000, Jon Bennett wrote:
> Would I be right in thinking that php alone can't change the content of
> a dropdown once the browser has loaded the file without a page refresh
> ??? In which case I need to source out some javascript, anyone got
> anything that might help me (code, tute, urls etc) as I'm not having
> much luck with google ??
I have done this in JavaScript - but I dont have any code handy.
Basically you will need to pre-generate a series of JavaScript arrays for each
category of product at the top of the web page. Then you have a JavaScript
event handler in the category pulldown that changes the product pulldown to a
different array whenever the category changes (use something like onClick or
onChange or a similar relevant event).
Works pretty well - I once worked on a project which pulled data from Access
via ODBC (I was coding in ASP - bleh! Never again... ;-) and generated the web
page with the arrays and JavaScript functions at the top to handle the
switching of the pulldowns.
-- Aj. Sys. Admin / Developer
- Next message: Chris W. Parker: "RE: [PHP] related products, how to's best practices"
- Previous message: Eduardo R. Maciel: "Re: [PHP] Problem with references"
- Maybe in reply to: Richard Davey: "Re: [PHP] related products, how to's best practices"
- Next in thread: Justin French: "Re: [PHP] related products, how to's best practices"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|