No replies
Last seen: 18 years 18 weeks ago
Timezone: GMT-7
Joined: 2004-02-28
Posts: 1
Points: 0


I'm trying to setup a page with 2 div' contains a form with a select (dropdown menu), the other I want to load a url when an item is selected from the dropdown.

Here are my div's:

<div id="dropdown">
<form target="content">
<select name="ddmenu" onchange="changeDiv()">
<option value="" />-
<option value="submit_article.php" />Article
<option value="submit_news.php" />News
<option value="submit_movie_review.php" />Movie Review
<option value="submit_comic_review.php" />Comic Review

<div id="content">

and here is the javascript changeDiv() function:

function changeDiv()
        option = document.dropdown.forms[0].ddmenu.options[document.dropdown.forms[0].ddmenu.selectedIndex].value;
        document.content.location = option;

Now, Javascript isn't quite my forte, and I'm not very sure how to access the div's (which I'm sure is quite obvious). I'd appreciate if some nice person could provide a few pointers. Smile