Personal tools
You are here: Home Lists ZPUG DC List Archives 2005 2005-04 newbie : select tag value setting problem / prabuddha ray <buddharay@gmail.com>
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

newbie : select tag value setting problem / prabuddha ray <buddharay@gmail.com>

newbie : select tag value setting problem
prabuddha ray <buddharay(at)gmail.com>
2005-04-13 04:00:15 [ FULL ]
I've this 'district' select tag .I'm getting the values usinga ZSQL method.
I want to set the value of the option by the district code and the
display the district name.

I tried this :
<div tal:repeat="district container/getDistrict">
<option tal:attributes="selected
python:test(distname==district.district_name, 'selected','');
     value district/district_code">
 <span tal:content="district/district_name"></span>
</option>
</div>

the drop down list is getting the district names but value is being
set only once.
i checked the request values and its giving the 1st list value everytime.

plz tell me how should i use the tal:attribute tag here so as to get
both the 'value' and the 'name' values as a list.[...]

Re: newbie : select tag value setting problem / prabuddha ray <buddharay@gmail.com>

Re: newbie : select tag value setting problem
prabuddha ray <buddharay(at)gmail.com>
2005-04-13 04:31:45 [ FULL ]
Thanks for the suggestion,

I added the 'value district/district_code' now only. 'selected' is
working fine . if i remove the 'value' thing its working fine.

i also tried this ; 
option tal:attributes="selected 
python:test(distname==district.district_name, 'selected','');
  value district/district_code"  tal:content="district/district_name">
</option>

as for the 'distname' test value() the def is:
<body tal:define="distname request/form/districtname|nothing; 

So guess since value tag is not set so  'distname'  is not being set.

 the select tag  is :
<select name="districtname"  onchange="reloadPage()">

plz suggest.


On 4/13/05, Andreas Jung <lists(at)andreas-jung.com> wrote:[...]
[...]

Re: newbie : select tag value setting problem / prabuddha ray <buddharay@gmail.com>

Re: newbie : select tag value setting problem
prabuddha ray <buddharay(at)gmail.com>
2005-04-13 04:39:46 [ FULL ]
sorry sir ,
              don bother about this problem solved.
 i made a silly mistake in passing the parameter in the ZSQL method.
 plz bear with me. 


On 4/13/05, prabuddha ray <buddharay(at)gmail.com> wrote:[...]
[...]

Re: newbie : select tag value setting problem / prabuddha ray <buddharay@gmail.com>

Re: newbie : select tag value setting problem
prabuddha ray <buddharay(at)gmail.com>
2005-04-15 02:25:23 [ FULL ]
sorry for this Mal -etiquitte,will be taken care of in future.

On 4/13/05, Jules <jules(at)jules.com> wrote:[...]
[...]

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: