Hi i have the following javascript and DropDownList:
function loadanlasstyp(ddl) {
var ControlName = document.getElementById(ddl.id);
if (ControlName.value == "Event") {
window.location = "../book/event.aspx";
}
else if (ControlName.value == "Short Meeting") {
window.location = "../book/shortmeeting.aspx";
}
return true;
}
DropDownList:
<asp:DropDownList ID="ddlAnlasstyp" runat="server" CssClass="ff" Height="21px" onChange="javascript:loadanlasstyp(this)"
TabIndex="3" Width="150px">
<asp:ListItem Value="Short meeting">Short</asp:ListItem>
<asp:ListItem Value="Event">Event</asp:ListItem>
</asp:DropDownList>
I have the Javascript function and the Dropdownlist on both Pages, so that i can switch between them. "Shortmeeting.aspx" is loading per default. I can switch from "Shortmeeting.aspx" to "Event.aspx" if i click "EVENT" in the DropDownList. Now if i want to Switch back to "Shortmeeting.aspx", for that i click on "SHORT" in the DropDownList, but it does not work.
How can i switch between these two pages correcly? Please Help