Solved

How to  assign select options from a file

Posted on 2002-04-16
8
191 Views
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.

<html><head><title>Test</title></head>
<body>
<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="|">
</object>

My problem is here:

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

How to assign the each file line to select item ???
0
Comment
Question by:olcay
  • 5
  • 2
8 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
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.

Cd&
 
0
 

Author Comment

by:olcay
ID: 6945445
>>COBOLdinosaur

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.

adress.txt:
http://www.experts-exchange.com
http://www.alltheweb.com
http://www.google.com
...

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

OK?
0
 
LVL 33

Accepted Solution

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


  webaddress
  http://www.experts-exchange.com
  http://www.alltheweb.com
  http://www.google.com


and here is the HTML:

<html><head><title>Test</title></head>
<body>

<!-- 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">
</object>

<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>
 </select>
</form>

<!-- this table works -->

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

</body>
</html>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6945598
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 33

Expert Comment

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

Expert Comment

by:knightEknight
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.
0
 

Author Comment

by:olcay
ID: 6945801
>>knightEknight
thanx very much :-)
0
 
LVL 33

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
css, html 6 48
Bootstrap input box width 2 33
Google maps isn't showing even after API has been entered 12 78
Bad <form> statement? 9 20
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

930 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now