populate <option>s from a file using Netscape?

G

George Hester

What's this? IE has a simple way using an ActiveX object so that I can load a text file into the <OPTION>s like a database. It is called Tabular Control. But I doubt this is going to work with Netscape. What to do?
 
G

George Hester

Thx for the story

--
George Hester
__________________________________
HikksNotAtHome said:
"George Hester" said:
What's this?

What is what?
IE has a simple way using an ActiveX object so that I can
load a text file into the <OPTION>s like a database. It is called
Tabular Control.

Only if I have ActiveX scripting enabled (I have it set to prompt and don't
always tell it yes).
But I doubt this is going to work with Netscape.

Nope, an IE ActiveX component won't work in Netscape. What about Opera, OmniWeb
or any of the other non-MS/NS browsers out?
What to do?

About what?

Suggestions:

1) Read the FAQ. Especially section 2.4 100 times or so.
2) Phrase your question well.
3) Include your question in the post.
4) Fix your newsreader.

Solution:

Stop using the IE-only ActiveX Control.

If the data file is being generated, whatever you are generating it with should
be capable of adding some extra data. Instead of generating:

item0Value,item0Text
item1Value,item1Text
item2Value,item2Text

Have it generate:

myArray = new Array();
myArray[0] = ["item0Value","item0Text"];
myArray[1] = ["item1Value","item1Text"];
myArray[2] = ["item2Value","item2Text"];

And then load it as mySelects.js and dynamically populate the select.

"Dynamically Populate Select List" in a c.l.j archive search returns 92 threads
that will show ways to populate it dynamically. Or simply loop through and
document.write them.
 
G

George Hester

OK thanks for that select.js. I may use it to help me with something else. But my issue still stands. How to get what is going to populate the <OPTION> from a text file so they are available in the HTML page and then select.js can do something with the data. My issue is not to do with what can I do with the data from the text but how to get it into the HTML from the text file so that I can work with it.

I was hoping for some sort of function in select.js like ImportTextFromFileToBeUsedInTheOptionTag() But I didn'e see that.
 
R

Randy Webb

George Hester writes with his broken newsreader:
OK thanks for that select.js. I may use it to help me with something
else. But my issue still stands. How to get what is going to populate
the <OPTION> from a text file so they are available in the HTML page
and then select.js can do something with the data.

I showed you how, you failed to recognize it.
My issue is not to do with what can I do with the data from the text
but how to get it into the HTML from the text file so that I can work
with it.



Either as an array in an external .js file, or a java applet, or an
HTTPResponse Object, or an IFrame (and read its source), or a Frame.

If you had bothered to read the FAQ, you would have found out about two
of those ways (Java applet and the HTTPResponse Object).
 
G

George Hester

Oh that's allright. I can use server side ADO so it's no big deal. I looked in select.js. I thought you had suggested that. My mistake. Sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top