on 02-11-2008 8:52 AM
Hello at all,
how can I get a blank line in a dropdownlistbox, which get's the values with helpValues.
In the helpValues there is no blank line.
Thanks in advanced.
Tina
Hi,
if you use an internal table append an initial line to it. Otherwise add an empty listbox element.
Best regards, Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<htmlb:dropdownListBox id = "ddid"
selection = "//model/selfield"
nameOfKeyColumn = "keycol"
nameOfValueColumn = "valcol"
helpValues = "//model/selfield" >
here you are using data binding, and the help values comes directly from the domain of the referenced field (reference by the variable //model/selfield) in such a case i am not sure whether you can locally (at bsp level) modify that to have an empty line.
if your <htmlb:dropdownListBox had used table parameters, then the solution is to simply add a empty line at the beginning of the itab
or you can use the following javascript approach.
< script>
var myselect = document. getElementById("ddid");
myselect. options[0] = new Option('NewoptionElementtext', 'NewoptionElementvalue');
< /script>
note: remove the leading space in < script and < /script and also the space after document. and myselect.
declare this javascript just below your htmlb:dropdown.... declaration
can you post your code in the view where you wrote the htmlb:dropdownlistbox and the javascript .
whats the id of the dropdown htmlb element , the same has to be used in the js
document. getElementById("ddid");
instead of ddid use the id you have set for htmlb:dropdownlistbox
or post your view layout code here
I used the id of htmlb:dropdownlistbox for document. getElementById.
<htmlb:dropdownListBox id = "ddezasp"
selection = "//kunde/bkto_change.ezasp"
nameOfKeyColumn = "ZAHLS"
nameOfValueColumn = "TEXTL"
helpValues = "//kunde/bkto_change.ezasp" />
< script>
var myselect = document. getElementById("ddezasp");
myselect. options[0] = new Option('', '');
< /script>
The code in my view is without leading spaces.
Edited by: Tina Trenkler on Feb 12, 2008 1:15 PM
if the error say object required, i guess the following line is having problem
var myselect = document. getElementById("ddezasp");
can you do a view source of your page (view) and see what is the id for dropdownlistbox. (<select tag)
just to make sure that the system is not appending anything to the id.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.