/    Sign up×
Community /Pin to ProfileBookmark

Java Script help

I am creating a web page well trying, what i am doing is if someone selects from my drop down menu as example;

Audi
BMW
Honda
Toyota

If they select BMW , i then want it to take them straight to the type of models

Roadster
Coupe

But problem having is dont know how to do that, if anyone has any advice please let me know, this is what i have so far.

<head>
<title>SalesPage1</title>
</head>
<h3><b>Trent Dickinson’s Online Shop</b></h3>

<form name=”myMakes” action=”SalesPage2.htm”>
<table>

<tr>
<td>
<select id=”makes” onChange=”getModel()”>
<option value=”noSelection” selected>Please select a make</option>
<option value=”Audi”>Audi</option>
<option value=”BMW”>BMW</option>
<option value=”Honda”>Honda</option>
<option value=”Toyota”>Toyota</option>
</select>
</td>
<td>

<select id=”model” onChange=”getQ()” style=”display:none”></select>

<table>

<tr>
<td>
<select id=”makes” onChange=”getModel()”>
<option value=”noSelection” selected>Please select a Model</option>
<option value=”Audi”>Audi</option>
<option value=”BMW”>BMW</option>
<option value=”Honda”>Honda</option>
<option value=”Toyota”>Toyota</option>
</select>
</td>
<td>

</td>

<td>
<div id=”loc_quantity” style=”display:none”>

Quantity: <input id=”quantity” name=”quantity” type=”text” value=”” size=”1″ onKeyUp=”getSubmit()”>
</div>
</td>

<td>
<div id=”loc_submit” style=”display:none”>
<input name=”mySubmit” type=”submit” value=”Continue”>
</div>
</td>

</tr>
<tr>
<td colspan=”3″><div class=”messagebox” id=”messagebox” style=”display:none”></div>

</td>
</tr>

</table>

</form>

</div>
</body>
</html>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@malarzNov 11.2007 — First of all it's not good idea to use to objects with same id - that's the point in id that it should be unique. You can manipulate select's options by Option object - You can read about it here: http://www.javascriptkit.com/jsref/select.shtml
Copy linkTweet thisAlerts:
@Declan1991Nov 12.2007 — First of all it's not good idea to use to objects with same id - that's the point in id that it should be unique. You can manipulate select's options by Option object - You can read about it here: http://www.javascriptkit.com/jsref/select.shtml[/QUOTE]
As a matter of fact, it's forbidden.
Copy linkTweet thisAlerts:
@malarzNov 12.2007 — In fact, yes it is ?
×

Success!

Help @trentkd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...