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

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

Reply via email to