473,396 Members | 1,996 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,396 software developers and data experts.

function isn't working for some reason! =(

var objListBox = document.getElementById('catalist');
var val = objListBox[objListBox.selectedIndex].value;
var txt = dyevalue00.value;
document.getElementById(val).value = txt;

To explain real quick, this is for a character maker.
The "catalist" is a listbox with different values such as "Body1" -
"Head" - "Shoes" - "Hair" etc
"dyevalue00" is a textbox
I have many textboxes that are named the same as the "catalist" values
(like textboxes named Body1 - Head - Shoes - Hair - etc..

So whatever is selected in "CataList" (let's say Hair) I want that
textbox to equal what another textbox of mine equals. So if the
selected value on CataList is "hair", then I want the textbox that has
the id of "hair" to equal whatever is inside the textbox with the id of
"dyevalue00".

I must be doing something wrong in my code, since this is n't working.
UseNet rocks so I know someone out there will know :D

Sep 3 '06 #1
2 1265
What I mean by it isn't working is it isn't doing what I intended it to
do. Since I'm new at javascript, everything I do is trial and error.
And if I error too much, I post on here - lol.

What I really need is a way to make it so that if the selected index on
listbox1.value="text1" then I can make the textbox named "text1" (which
text1 is from the listbox.value) equal another textbox's value.

Not sure how to do that though

Sep 3 '06 #2
wrote on 03 sep 2006 in comp.lang.javascript:
What I mean by it isn't working is it isn't doing what I intended it to
do. Since I'm new at javascript, everything I do is trial and error.
And if I error too much, I post on here - lol.

What I really need is a way to make it so that if the selected index on
listbox1.value="text1" then I can make the textbox named "text1" (which
text1 is from the listbox.value) equal another textbox's value.

Not sure how to do that though
Are you anwering on something?

Please quote what you are replying to.

<http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 3 '06 #3

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

Similar topics

9
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
26
by: _R | last post by:
Given that VS2005 has made an effort to clean up the syntax of VC++ (in C++/CLI), is there any future plans to do away with function protos, ala C#/VB? What are they needed for these days?
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
11
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers...
2
by: Noggon | last post by:
My function, called first() keeps coming back to me in the javascript console as being undefined. Yet I can't think why it isn't loaded. Maybe I'm brain dead, so could use some help! :-) What...
10
by: ddtbhai | last post by:
Hello folks, Just wanted to know if there are some 'standard' approaches to enforcing an order in the invocation of calling functions. It is usually needed when initializing some object. e.g...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
17
by: DanielJohnson | last post by:
how to use the combination function in python ? For example 9 choose 2 (written as 9C2) = 9!/7!*2!=36 Please help, I couldnt find the function through help.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.