Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-25-2004, 09:06 PM   PM User | #1
mTorbin
New to the CF scene

 
Join Date: Aug 2004
Location: Philadelphia, Pa
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
mTorbin is an unknown quantity at this point
Flat File DB

Hey all,

OK, so here's the deal. I want to create a flat file DB for a toy I'm working on. It will work like this:

1) The user will select an ththemployee's name from the dropdown menu.
2) When then name is selected, certain fields of information will change to reflect the new ththemployee name.

We're talking about 250 approximate ththemployees. Each "row" in the DB will have the following:

- name
- office location
- ththemail address
- phone number
- extension

I could do it with a WHOLE BUNCH of arrays, but that would get insane. Anyone have any suggestions on the DB? I've never done this before, but I know my JS pretty well.

- MT
__________________
-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-
Matt Torbin
Center City Philadelphia Macintosh Users Group
http://www.ccpmug.org/
mTorbin is offline   Reply With Quote
Old 08-25-2004, 09:32 PM   PM User | #2
Garadon
Regular Coder

 
Join Date: Jul 2002
Posts: 698
Thanks: 0
Thanked 0 Times in 0 Posts
Garadon is an unknown quantity at this point
you could put is all as text in a tag and then with some predefined character combination split the text up into an array. but then you migth as well had put it in an array to begin with and save time not doing the split. and it would most likely be a pest to updated that tag mentioned earlier. Or you could put it all in a real db and then write it as an array when the file is called which makes it easy to update the db but mostlikely take up some more bandwidth than the previous mentioned idea.
Or my 1st and last idea you could use an XML approach I am not completly sure as to how you incorporate js into an XML or the other way around but I am sure it can be done and if can't you can emulate xml storage using normal html tags like for instance the table,tr,td tags as a logical build up storage. just remember to hive those tags and then with java script fetch the names in the employer name column and the then when an employer name is selected in the drop down thing fetch the values from the table corresponding to the emplyoername.

I am quite sure I haven't quite understood what you question actually was lol

Last edited by Garadon; 08-25-2004 at 09:36 PM..
Garadon is offline   Reply With Quote
Old 08-25-2004, 09:54 PM   PM User | #3
mTorbin
New to the CF scene

 
Join Date: Aug 2004
Location: Philadelphia, Pa
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
mTorbin is an unknown quantity at this point
What about Perl?

Could this be done more easily with perl? Again, I want to stick with the flat file concept.

- MT
__________________
-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-
Matt Torbin
Center City Philadelphia Macintosh Users Group
http://www.ccpmug.org/
mTorbin is offline   Reply With Quote
Old 08-25-2004, 11:48 PM   PM User | #4
scroots
Senior Coder

 
Join Date: Jun 2002
Location: UK
Posts: 1,137
Thanks: 0
Thanked 0 Times in 0 Posts
scroots is an unknown quantity at this point
i did a computing project with an access database with javascript and an activex to access it. It depends on its use as activex requires consent, so an intranet or desktop use you could easily get away with.

if you want to know let me know as i have a full documented project on it.

it makes use of sql aswell.

EDIT: the link for the section of code posted on here http://www.codingforums.com/showthread.php?t=31730

If you need anymore help i would be able to assist you.

scroots
__________________
Spammers next time you spam me consider the implications:
(1) that you will be persuaded by me(in a legitimate mannor)
(2)It is worthless to you, when i have finished

Last edited by scroots; 08-26-2004 at 12:14 AM..
scroots is offline   Reply With Quote
Old 08-26-2004, 12:01 AM   PM User | #5
sad69
Senior Coder

 
Join Date: Feb 2004
Posts: 1,206
Thanks: 0
Thanked 0 Times in 0 Posts
sad69 is an unknown quantity at this point
With pure Javascript it would be ugly, but using Perl opens up some opportunity:
http://www.databasejournal.com/sqlet...le.php/1428581

Hope that helps,
Sadiq.
sad69 is offline   Reply With Quote
Old 08-26-2004, 09:20 AM   PM User | #6
jbot
Senior Coder

 
Join Date: Feb 2004
Location: Edinburgh
Posts: 1,352
Thanks: 0
Thanked 0 Times in 0 Posts
jbot is an unknown quantity at this point
if this is an IE-only project you could always use a Tabular Data Control (TDC). see this forum's sister site for more info: www.javascriptkit.com
__________________
*keep it simple (TM)
jbot is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:26 PM.


Advertisement
Log in to turn off these ads.