Select box verify with javascript
<p>I am trying to ask users to verify their select option choice by using a javascript alert. If the user clicks continue then it will delete the choice, if they click cancel they will return to page.
I have the php code for a drop down done, so it will be populated with code from a database and the user can then select a value to delete. I dont know what the javascript must be to ask a verification. </p>

<p>My php code so far is:</p>

<pre><code>&lt;select&gt;
&lt;option selected name="offer"&gt;Click here to choose item&lt;/option&gt;
&lt;?
$sql = "SELECT * FROM items";
$res = $dbi-&gt;dbDo($sql);
while( $row = mysql_fetch_assoc($res) ) { 
print_r('&lt;option&gt;'.$row['name'].'&lt;/option&gt;');
}
?&gt;
&lt;/select&gt;

&lt;input type="submit" value="Delete" class="button-delete" onClick="submit()"&gt;&lt;/input&gt;
</code></pre>

<p>So now there should be a javascript function called submit, but before they submit a confirmation must happen.</p>

<p>Thanks</p>
