only first <option> of <select> is displayed

  • Robert Magdziarz
  • Born
  • Born
  • Robert Magdziarz
  • Posts: 1

Post 3+ Months Ago

Hello,
I have a problem: although <select> contains many <option>s, only the
first one is displayed (I use Polish language, UTF-8):
Code: [ Select ]
            <select id="price_for" name="price_for" >
                <option value="" selected>(select)</
option>
                <option value='C'>całość</option>

<option value='M2'>metr kwadratowy</option>
<option value='M'>miesiąc</option>
<option value='MOL'>miesiąc + opłaty licznikowe</option>
<option value='MCZ'>miesiąc z czynszem</option>
<option value='MCZOL'>miesiąc z czynszem + opłaty licznikowe</option>
<option value='OM'>osobę/miesiąc</option>
<option value='OMOL'>osobę/miesiąc + opłaty licznikowe</option>
            </select>
  1.             <select id="price_for" name="price_for" >
  2.                 <option value="" selected>(select)</
  3. option>
  4.                 <option value='C'>całość</option>
  5. <option value='M2'>metr kwadratowy</option>
  6. <option value='M'>miesiąc</option>
  7. <option value='MOL'>miesiąc + opłaty licznikowe</option>
  8. <option value='MCZ'>miesiąc z czynszem</option>
  9. <option value='MCZOL'>miesiąc z czynszem + opłaty licznikowe</option>
  10. <option value='OM'>osobę/miesiąc</option>
  11. <option value='OMOL'>osobę/miesiąc + opłaty licznikowe</option>
  12.             </select>

When I insert quoted code into empty .html file, it works. But on my page
of my website, it doesn't work although I have no CSS rules concerning
these <select>s. The structure of my page is as below:

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/
html4/strict.dtd">
<html lang="pl">
<head>
    <title>Nieruchomości - ogłoszenia</title>
    <meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
    <meta http-equiv="Content-Language" content="pl-PL">
    <meta name="language" content="polish">
    <meta name="robots" content="index,nofollow">
</head>
<body>
<form name="announcement" action="submit_announcement.php" method="POST">
    <fieldset>
        <table id="announcement_fields" border="0">
        <tbody>
        <tr>
        <td><label for="price_for">Cena za:</label></td>
        <td>
            <select id="price_for" name="price_for" >
                <option value="" selected>(wybierz)</
option>
                <option value='C'>całość</option>

<option value='M2'>metr kwadratowy</option>
<option value='M'>miesiąc</option>
<option value='MOL'>miesiąc + opłaty licznikowe</option>
<option value='MCZ'>miesiąc z czynszem</option>
<option value='MCZOL'>miesiąc z czynszem + opłaty licznikowe</option>
<option value='OM'>osobę/miesiąc</option>
<option value='OMOL'>osobę/miesiąc + opłaty licznikowe</option>
            </select>
                    </td>

        </tr>
    </fieldset>
</form>
</body>
</html>
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/
  2. html4/strict.dtd">
  3. <html lang="pl">
  4. <head>
  5.     <title>Nieruchomości - ogłoszenia</title>
  6.     <meta http-equiv="Content-Type" content="text/html;
  7. charset=utf-8">
  8.     <meta http-equiv="Content-Language" content="pl-PL">
  9.     <meta name="language" content="polish">
  10.     <meta name="robots" content="index,nofollow">
  11. </head>
  12. <body>
  13. <form name="announcement" action="submit_announcement.php" method="POST">
  14.     <fieldset>
  15.         <table id="announcement_fields" border="0">
  16.         <tbody>
  17.         <tr>
  18.         <td><label for="price_for">Cena za:</label></td>
  19.         <td>
  20.             <select id="price_for" name="price_for" >
  21.                 <option value="" selected>(wybierz)</
  22. option>
  23.                 <option value='C'>całość</option>
  24. <option value='M2'>metr kwadratowy</option>
  25. <option value='M'>miesiąc</option>
  26. <option value='MOL'>miesiąc + opłaty licznikowe</option>
  27. <option value='MCZ'>miesiąc z czynszem</option>
  28. <option value='MCZOL'>miesiąc z czynszem + opłaty licznikowe</option>
  29. <option value='OM'>osobę/miesiąc</option>
  30. <option value='OMOL'>osobę/miesiąc + opłaty licznikowe</option>
  31.             </select>
  32.                     </td>
  33.         </tr>
  34.     </fieldset>
  35. </form>
  36. </body>
  37. </html>


This page works fine, but it's only part of my page on which <select>s
don't work.
Moderator Remark: added [code] tags
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Perhaps because you didn't close your <table> and <tbody> tags?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Also, carry that option> to the previous line to make </option... Your server could be interpreting that as </\n and not a </option like your browser does... I don't know...
HTML Code: [ Select ]
          <option value="" selected>(select)</option>
            <option value='C'>calosc</option>
  1.           <option value="" selected>(select)</option>
  2.             <option value='C'>calosc</option>

and not
HTML Code: [ Select ]
          <option value="" selected>(select)</
option>
            <option value='C'>calosc</option>
  1.           <option value="" selected>(select)</
  2. option>
  3.             <option value='C'>calosc</option>

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 73 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.