AJAX seems to be, and correct me if I'm wrong, fancy dropdown menus. And, although it's very cool (I've bookmarked it, as I have no doubt I'll need it someday), I'm not really interested in the dropdown menu--I just want a way for, when something is selected from a simple dropdown, information appears below it without a refresh. I'm pretty sure I've seen this done.
Besides, nothing is impossible with the intar-web.
EDIT: And, to be clear, when I see information to appear below it I don't mean a drop down menu. What the dropdown menu LINKS to IS the paragraph of information that appears below it. Does that make sense?
Since you asked about a drop down I would think that a simple javascript would be a better solution in this case.
Something like this:
Code:
<script type="text/javascript">
function changeptext(){
var box=document.getElementById('selectbox');
var othertext=document.getElementById('paragraph');
if(box.value == 'a' ){
othertext.innerHTML = 'This is the text for Selected A';
}
else if(box.value == 'b' ){
othertext.innerHTML = 'This is the text for Selected B';
}
else if(box.value == 'c' ){
othertext.innerHTML = 'This is the text for Selected C';
}
else{
othertext.innerHTML = 'Select a value from the dropdown to get more info';
}
}
</script>
<select name="any" onchange="changeptext()" id="selectbox">
<option value="">SELECT SOMETHING</option>
<option value="a">A</option>
<option value="b">B</option>
<option value="c">C</option>
</select>
<div style="width:200px;background:#E8E8E8" id="paragraph">
Select a value from the dropdown to get more info
</div>
That way you :
A) Wouldn't Need to Create a seperate page for each paragraph
B) You could easily add the javascript with a php loop to create the paragraph info if you are pulling that from a db.