PHP + Javasript make a drop down menu

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
aaronhibbard
Forum Newbie
Posts: 1
Joined: Thu Oct 23, 2003 3:32 pm
Location: Fostoria

PHP + Javasript make a drop down menu

Post by aaronhibbard »

Hello everyone. I have an idea and I was wondering if it was possible.
here is the case.
Ex.
Record 1 | Record 2 | Record 3

Now I have a display like this...I want them to be able to click Record on and have the screen show all sub records within this record...without refreshing the page....
EX
Record 1-p1 | Record1-p2 | Record1-p3
-$record1 subdate | $record2 subdata
on the page pushing the results down
so
top layer = Record 1-p1 | Record1-p2 | Record1-p3
sub layer = -$record1 subdate | $record2 subdata
have any suggestions? Thanks
-Aaron
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Just think about what needs to be done then start from there.

First of all you will need PHP to create some JavaScript for you which is easy...

Code: Select all

<head>
<script language="javascript">
testvar = <? echo $something ?>;
</script>
</head>
... then it's a simple case of either using PHP or a JS function to create the HTML menus. DIVs are probably your best choice for drop-down menus.
Post Reply