Wednesday, December 24, 2003, 7:02:24 PM, you wrote:

ML> Just don't set the form value.


ML> On 24 Dec 2003, at 15:15, AKostylev wrote:

>> I want to have select element without any selected values by default.
>> I can do this by setting selectedIndex=-1 or
>> value='not_existing_value' in JavaScript.
>> Can I do this with Struts functionality?

I use select with multiple=false and I don't set the parameter's
value. As result I get:

<form name="faqForm" method="post" action="/dp/showFaq.do">
        <select name="id" onchange="submit()">
        <option value="1">Test1</option>
        <option value="2">Test2</option>
        </select>
</form>

So none of options has "selected" attribute, but first option is
selected on the page.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to