linkproblem bei drop down menue

Atti

Erfahrenes Mitglied
guten tag, ich habe folgendes problem. auf der site ist ein drop down menue. weiterhin habe ich auf der site eine tabelle in der über php die entsprechenden inhalte (z.b. about.html) dargestellt werden sollen.

das problem ist, dass ich nicht genau weiss wie ich den link in dem drop down reinmache und die about.html in der tabelle erscheint. bei einem "normalen" link ist das kein problem.

z.b. <a href="home.php?site=about">

aber ich weiss ned wie ich so ein link in das drop ding reinmache.

kann mir da jemand weiterhelfen?

head:

<SCRIPT LANGUAGE="JavaScript"><!--
function openURL()
{

// get index number of the selected option
selInd = document.Form.field.selectedIndex;

// get value of the selected option
goURL = document.Form.field.options[selInd].value;

// redirect browser to the value it got (hopefully your URL)
top.location.href = goURL;

}

//-->
</SCRIPT>

body:

<FORM name=about>
<SELECT class=Body
style="FONT-SIZE: 11px; BACKGROUND: #333333; COLOR: #ffffff; FONT-FAMILY: verdana"
onchange=goURL(this.form.drop.options[this.form.drop.selectedIndex].value)
name=drop>
<OPTION value="" selected>about</OPTION>
<OPTION
value="">····························</OPTION>
<OPTION
value="home3.php?site=about">// me</OPTION>
<OPTION
value="">····························</OPTION>
</SELECT>
</FORM>
 
erledigt im sinne von: du hast es rausgefunden? dann poste es doch für die anderen member. vielleicht kans ja irgendwann noch jmd gebrauchen ;)

wenn nicht, auch egal :)
 
head:

<script language="JavaScript">
<!--
function goToURL(form)
{

var myindex=form.dropdownmenu.selectedIndex
if(!myindex=="")
{
window.location.href=form.dropdownmenu.options[myindex].value;


}
}
//-->
</script>

body bzw. menue

<form name="about">
<SELECT class=Body
style="FONT-SIZE: 11px; BACKGROUND: #333333; COLOR: #ffffff; FONT-FAMILY: verdana"
name="dropdownmenu" onChange="goToURL(this.form)">
<OPTION value="" selected>about</OPTION>
<OPTION
value="">····························</OPTION>
<OPTION
value="http://meinedomain.de/home44.php?site=about">// me</OPTION>
<OPTION
value="">····························</OPTION>
</SELECT>
</form>
 

Neue Beiträge

Zurück