473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

dynamic multiple selects

Holas,

I want to do the following:
If one entry in multiple select "domain" is selected, i want to change
the content in dropdown "typ" dynamically according to the selected
domain.

If more than one entries in domain are selected, i want the dropdown
typ to disappear

here the javaScriptCode that causes an "typ has no properties" -Error:
<script language="Javascript">
<!-- Start
function updateType()
{
domain = document.forms["frm"].elements["txtDomain"];
typ = document.forms["frm"].elements["txtType"];

typ.options.length = 0; // DropDown Menü entleeren

if (domain.options
[domain.selectedIndex].
value == "Email")
{
typ.options[0] = new Option("Software");
typ.options[1] = new Option("Anbieter");
}
else if (domain.options
[domain.selectedIndex].
value == "Internet")
{
typ.options[0] = new Option("Internetzugang");
typ.options[1] = new Option("Webseiten erstellen");
}
}
// Ende -->
</script>

here the multi selects:

<tr class="color1">
<td>Domain: (Mehrfachauswahl mit <br/>gedrückter Strg-Taste
möglich)</TD>
<td colspan="2">
<SELECT size=3 name="txtDomain[]" multiple="multiple"
onchange="updateType()">
<OPTION value=0 selected> alle </OPTION>
<?
while ($arrDomain = mysql_fetch_array($rsDomain))
{
echo("<OPTION value=".$arrDomain["ID"]."> ".$arrDomain["Name"]."
</OPTION>");
}
?>
</SELECT>
</TD>
</TR>

<tr class="color1">
<td>Type: (Mehrfachauswahl mit <br/>gedrückter Strg-Taste
möglich)</TD>
<td colspan="2">
<SELECT size=3 name="txtType[]" multiple="multiple">
<OPTION value=0 selected> alle </OPTION>
</SELECT>
</TD>
</TR>

I would appreciate any help..
thank you very much

Dennis

Aug 8 '05 #1
1 1809
d.********@gmx.net wrote:
Holas,

I want to do the following:
If one entry in multiple select "domain" is selected, i want to change
the content in dropdown "typ" dynamically according to the selected
domain.

If more than one entries in domain are selected, i want the dropdown
typ to disappear

here the javaScriptCode that causes an "typ has no properties" -Error:
<script language="Javascript">
<!-- Start
function updateType()
{
domain = document.forms["frm"].elements["txtDomain"];
domain = document.forms["frm"].elements["txtDomain[]"];

typ = document.forms["frm"].elements["txtType"];
typ = document.forms["frm"].elements["txtType[]"];

No?

Mick

[snip]
Aug 9 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marc | last post by:
Hello, I have a form with multiple selects (pullDown). All selects have the same name but each select has a different value. The user selects a value in each select. When he submits the form I...
2
by: dave | last post by:
I am trying to run 3 dynamic selects from stored proc, really only the table name is dynamic.. Anway I'm kinda lost on how I can accomplish this.. this is what I have but it only returns the first...
13
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when...
1
by: Kum | last post by:
Hi, I need help in asp.net dynamic textbox controls validation. I am creating textbox controls dynamically on a asp.net webpage. Now after creating the textboxes on the page I want to validate...
4
by: DraguVaso | last post by:
Hi, For my VB.NET application I have the following situation: 2 tables on my SQL Server: tblAccounts and tblRules. For each Account there are many Rules (so tblRules is linked to my tblAccounts...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
2
by: rehevkor5 | last post by:
I have written Javascript which populates a form with <select> elements dynamically based on some other stuff going on in the page. The problem is that I can't get it to work properly in IE, and...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
4
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.