/    Sign up×
Community /Pin to ProfileBookmark

Set database with a drop down list

I have a serious problem now. My final year project required me to open different databases using a drop down list den the data will be display in a listbox. How should I go about doing it? I really have no idea at all ? ? Any experts out there can help me??

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@number7Nov 02.2006 — You should use [B]onchange[/B] event in your <select> element like:

<onchange='form.submit()'> and then fill the list with some data from a database you selected.

That's the way I understand what you need. Am I right ?
Copy linkTweet thisAlerts:
@yuling86authorNov 02.2006 — <select name="database" method="get">

<option name="db">-----</option>

<option name="db"
<% OpenCMDBConnection CMDBConn
SET rs = CMDBConn.Execute("SELECT Name FROM Company") %>
value="cmdb">CM </option>

<option name="db" value="ipcdb">IPC</option>

<option name="db"
<% OpenIVRDBConnection IVRDBConn
SET rs = IVRDBConn.Execute("SELECT Name FROM Organization") %>
value="ivrdb">IVR </option>

<option name="db"
<% OpenMLDBConnection MLDBConn
SET rs = MLDBConn.Execute("SELECT m_companyName FROM ContactList") %>
value="mldb">ML </option>

<option name="db"
<% OpenSCMDBConnection SCMDBConn
SET rs = SCMDBConn.Execute("SELECT Name FROM System_Company") %>
value="scmdb">SCM </option>


</select>


I found some codes and I modified abit but only the last database data is captured. I think my codes are wrong because i dont even need to choose from the drop down list. Do I need some function to get the coding work???
×

Success!

Help @yuling86 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...