dropdwon list
Moderator: General Moderators
-
Maluendaster
- Forum Contributor
- Posts: 124
- Joined: Fri Feb 25, 2005 1:14 pm
dropdwon list
I want to create a downdrop of all the Galleries i have in the database.... and the babes showing in the dropdown will be linked to their specific URL....
The tables i think i have to use is Name and URL , don't know how to do this..
anyone can give me a hint,, i'm a newbe...
thanks
The tables i think i have to use is Name and URL , don't know how to do this..
anyone can give me a hint,, i'm a newbe...
thanks
-
Maluendaster
- Forum Contributor
- Posts: 124
- Joined: Fri Feb 25, 2005 1:14 pm
ok, i guessi didn't make mysqslf clear, I don't want any images on the dropdown, i just want the names and when you select a name, it redirects to the gallery...
The names are in a table called galeria which has 3 fileds, Name, ID and URL...
I want to be able to automaticly (spell) appear in the dropdown list when i add a new gallery...
The names are in a table called galeria which has 3 fileds, Name, ID and URL...
I want to be able to automaticly (spell) appear in the dropdown list when i add a new gallery...
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
Code: Select all
<form name = 'formChangeLocation'>
<select name = 'changeLocation' onchange = 'document.location.href = frmChangeLocation.changeLocation.value'>
<option value = '<?php echo $url; ?>'>
<?php echo $value; ?>
</option>
</select>
</form>indeed Feyd:
you should check that the value is not null before you do anything with the event:
ex:
you should check that the value is not null before you do anything with the event:
ex:
Code: Select all
<select name="blah" onChange="if(this.value != "") someFunction();">