You are here: Re: Any idea why echo selected isn't working in mozilla? « PHP Programming Language « IT news, forums, messages
Re: Any idea why echo selected isn't working in mozilla?

Posted by Rik on 06/10/06 01:02

Patrick wrote:
> Erwin Moller wrote:
>> Patrick wrote:
>>> <select class="inform" name="colm1">
>>> <option value="A" <?php if (strcmp($colm1,$A)==0) echo
>>> "selected='$colm1'";
>>>>> A</option>
>> Your setup produces illegal HTML and Explorer doesn't mind
>> appearantly, but FF does.
>> The reason it is illegal is that SELECTED has no value.
>> Good select-box looks like this:
>> <select name="bla">
>> <option value="1">1
>> <option value="2" SELECTED>2
>> <option value="3">3
>> </select>
> Okay so I took echo "selected='$colm1'"; out and just have echo
> "SELECTED"
> Oddly enough if I look at the source from the page it shows that it
> should work. It just doesn't turn it to the correct letter on the
> dropdown. <scratches head>
>
> <select class="inform" name="colm1">
> <option value="A" >A</option>
> <option value="B" SELECTED>B</option>
> <option value="C" >C</option>
> </select>


XHTML perhaps? In which case it should be 'selected="selected"'.

Else, I wouldn't know

The above HTML-code produces correct dropdowns here. That's the exact code
you get from your script?

Grtz,
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация