Page 1 of 1

Submit to Hidden UL

Posted: Tue Dec 30, 2008 3:15 pm
by CoolAsCarlito
What I want to do is when Add is clicked after choosing a charactername then it drops down into a ul where each charactername would be put into a li and obviously more than one can be chosen. And until one is added then it says "This handler does not have any characters assigned."

Code: Select all

 
print'<h2 class="backstage">Characters<br /><br /><input type="hidden" name="action" value="handler"><input type="hidden" name="routine" value="addcharacter"><input type="hidden" name="option" value="0"><input type="hidden" name="id" value="0"><select name="characterid" class="dropdown">';
print'<option value="0">- Select -</option>';
$query = 'SELECT charactername FROM characters';
            $result = mysql_query($query);
            while ($row = mysql_fetch_assoc($result))
            {
            print "<option value=\"{$row['charactername']}\">{$row['charactername']}</option>\r";
            }             
print'</select>&nbsp;&nbsp;<input type="submit" value="Add" class="button" ></form></h2><br />';
print'This handler does not have any characters assigned.<br /><br />';
 

Re: Submit to Hidden UL

Posted: Wed Dec 31, 2008 3:50 am
by josh
Uh why not just write the whole string to a div? You could do this with a loop and assign each character by DOM index