cancel
Showing results for 
Search instead for 
Did you mean: 

Provide values in the dropbox in BSP

Former Member
0 Kudos

Hi Guys,

I am trying to populate values in the dropdown list in javascript.

I know how to populate manually using SELECT and pushing the values manually through OPTIONS. I dont want to do it manually. B'cos every time user introduces new value I need to change the code and hard code it in the program.

I need to get the list from a DB table, i.e., when ever a new value is added to the table that should be automatically included in our list.

I can get the details from the database table and keep it in a internal table.

I need to populate this list using this internal table.

Can you please tell me how I should use this internal table to add in the list in javascript.

Thx

Mohan

Accepted Solutions (1)

Accepted Solutions (1)

GrahamRobbo
Active Contributor
0 Kudos

This is pretty basic stuff Mohan - perhaps you should start to read the documentation, the Wiki, etc. to learn this yourself?

Anyway, if you don't want to use the supplied HTMLB extension for the dropdown listbox you can do something like this.


select id="dropdown1">
<% loop at itab reference into ref. %>
<option><%= ref->value%></option>
<% endloop. %>

Cheers

Graham Robbo

Former Member
0 Kudos

Hello Robinson,

The one you told is very good.

I have already done loop... endloop in HTML.

I need to use this loop... endloop in javascript. If you have replied my question to be in javascript then please do send me the link where it is used.

As I am finding difficult to declare " reference into ref".

<% loop at itab reference into ref. %>

<option><%= ref->value%></option>

<% endloop. %>

Can you please explain the logic to put loop.. endloop in javascript.

Mohan

Answers (0)