/    Sign up×
Community /Pin to ProfileBookmark

implement car model

How can I have some custom programing implemented when the user selects the type of car it will only show models for that type of car.

Here is the link I can get the model information on each car.

[url]www.ezeechoiceextendedwarranty.com[/url]

how can I do it with Javascript like this company’s website did it? thank you very much

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@handong888authorFeb 07.2005 — could anyone help it? thank you
Copy linkTweet thisAlerts:
@FangFeb 07.2005 — This is with fruit, but the principle is the same:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Change selection in one box from another</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
var varieties=[
["varieties","granny smith","golden delicious","jonathan"],
["varieties","anjou","bartlett","conference"],
["varieties","valencia","pineapple","pera"]
];

function Box2(idx) {
var f=document.myform;
f.box2.options.length=null;
for(i=0; i<varieties[idx].length; i++) {
f.box2.options[i]=new Option(varieties[idx][i], i);
} <br/>
}
//--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="Box2(0);"&gt;
&lt;form name="myform" method="post" action="http://www.mysite.com/mysite"&gt;
&lt;div&gt;
&lt;select name="box1" onchange="Box2(this.selectedIndex)"&gt;
&lt;option value="a"&gt;apple&lt;/option&gt;
&lt;option value="b"&gt;pear&lt;/option&gt;
&lt;option value="c"&gt;orange&lt;/option&gt;
&lt;/select&gt;
&lt;select name="box2" onchange=""&gt;&lt;/select&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @handong888 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.13,
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,
)...