Dynamically Creating a Select Index

G

Gregc.

Hi

I have a main.html and an index.html page. The layout of the page
looks like this, the main sits on top of the page:

----------------------------
main.html - Top of Page
---------------------------
index.html -Middle of Page
---------------------------

I want to have a function in index.html that will have an array of
cars:

function selectCar{

Array 1 = holden
Array 2 = Ford
Array 3 = Mercedes
}


the main.html will look something like this:

<form name="fmCar" id="fmCar" method="post" action="">

<table width="100%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td><strong>Select Car</strong>

<selectname="selectCar"id="selectCar">
<option></option>

</select>
<input name="btnShowCar
type="button" id="btnShowCar" value="Show CarInfo"
onclick="selectCar(this.form)"/> </td>
<td align="right">
<input name="btnSetDefaultCar"
type="button" id="btnSetDefaultCar" value="Save this Car as your
Default Car"onclick="setDefaultCar(this.form)"/>
</td>
</tr>
</table>


My question is can this be done?

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,903
Messages
2,570,001
Members
46,355
Latest member
Marianne08

Latest Threads

Top