How to  assign select options from a file

Posted on 2002-04-16
Last Modified: 2010-04-09
See the following code. I read a file line for line and should append the values in a select list.

<object id="Adressen" classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
 <param name="DataURL" value="adressen.txt">
 <param name="UseHeader" value="false">
 <param name="FieldDelim" value="|">

My problem is here:

<select datasrc="#Adressen"><option> ????</option>

How to assign the each file line to select item ???
Question by:olcay
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
LVL 53

Expert Comment

ID: 6945344
The object is going to have to put it in a JavaScript variable, and invoke a function to dynamically generate HTML.

What is it you are trying to do?  I don't understand this at all.


Author Comment

ID: 6945445

I have to read web-adresses from a text file and represent thuse in a combobox.

After a user has selectet a combobox item, he will be linkt to the web-aadress.


this web-adresses should be read and listet in the combobox
in the html-page.

LVL 33

Accepted Solution

knightEknight earned 200 total points
ID: 6945547
Here is what I tried without success ...
here is my Adressen.txt file:


and here is the HTML:


<!-- note the changes to the object below -->

<object id="Adressen" classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
 <param name="DataURL" value="adressen.txt">
 <param name="UseHeader" value="true">

<form name="myform">

<!-- note: I tried several variations with the select, one at a time ... but all are shown here. -->

 <select datasrc="#Adressen" DATAFLD="webaddress" DATAFORMATAS="html" multiple>
  <option DATAFLD="webaddress" DATAFORMATAS="html"></option>
  <option><DIV DATAFLD="webaddress" DATAFORMATAS="html"></DIV></option>

<!-- this table works -->

<TABLE datasrc="#Adressen" BORDER DATAPAGESIZE="10" ID="TABLE1">
   <TD><DIV DATAFLD="webaddress" DATAFORMATAS="html"></DIV></TD>

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 33

Expert Comment

ID: 6945598
LVL 33

Expert Comment

ID: 6945606
... then click on:  Binding HTML Elements to Data
LVL 33

Expert Comment

ID: 6945615
... this seems to suggest that the purpose for binding a select to a datasource is to choose which item in the select will be selected (via the selectedIndex property), and not to populate the OPTIONS with data in a similar manner to how a table works.

Author Comment

ID: 6945801
thanx very much :-)
LVL 33

Expert Comment

ID: 6945816
Thanks for the A, but I was never able to get this working as expected.  Did you?

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Popup write two lines 3 30
close pop up windows when logout or main window closes 17 84
Scroll 5 news at a time using vticker 2 37
Horizontal Full Calendar using php 5 37
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question