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

Webform Data Entry-How to set variable in conditional dropdown box?

2
How do I set the value of ProdQuality_1_hid and change the drop down list on the screeen?

I tried sending to the address bar:

Expand|Select|Wrap|Line Numbers
  1.  javascript:setProdQuality_1_hid('Medium') {enter}
  2.  
  3.  
but I may nedd to send it to the variable "value". Client webform takes
text entry, Medium and translates to a number 2.


Ideally, I would like to set the values ProdQuality_1_hid, ProdQuality_2_hid,
etc all at once.


I supsect I have a syntax error.

Also, the drop down box does not change on the screen.


Please go easy on my I am new to programming in JavaScript
-----------------------------------------------------------------------

Code from client's webform:


<input type=hidden id="ProdQuality_1_hid" name="ProdQuality_1_hid" value="">
<select onkeydown="javascript:editMe('Condition','Line2',' Section1Notes1')" onblur="javascript:editCheck('Condition','Line2',' Section1Notes1');changeColor()" onchange="javascript:changeState()" name=ProdQuality_1 id=ProdQuality_1 class=cellSelectBox>
<option id=0 value=0>&nbsp;</option>
<option id="1" value="1">High</option>
<option id="2" value="2">Medium</option>
<option id="3" value="3">Low</option>


...

REPEATS OVER AND OVER


<input type=hidden id="ProdQuality_2_hid" name="ProdQuality_2_hid" value="">
<select onkeydown="javascript:editMe('Condition','Line2',' Section1Notes1')" onblur="javascript:editCheck('Condition','Line2',' Section1Notes1');changeColor()" onchange="javascript:changeState()" name=ProdQuality_2 id=ProdQuality_2 class=cellSelectBox>
<option id=0 value=0>&nbsp;</option>
<option id="1" value="1">High</option>
<option id="2" value="2">Medium</option>
<option id="3" value="3">Low</option>




Thank you in Advance.


Quark1
Apr 16 '07 #1
3 4242
acoder
16,027 Expert Mod 8TB
Welcome to The Scripts.

To set the value of the hidden element:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("ProdQuality_1_hid").value=selObj.value
where selObj is the select object.

How do you want to change the dropdown?
Apr 16 '07 #2
quark1
2
Welcome to The Scripts.

To set the value of the hidden element:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("ProdQuality_1_hid").value=selObj.value
where selObj is the select object.

How do you want to change the dropdown?
-------------------------------------------------------------------
Thanks Acoder


I get the data from a table in Excel. Sometimes, the answer is High or Medium, Low. Should I use text to set the value or the numeric equivalent value. 1 or 2 or 3.

Normally, if I changed the dropdown value by tabbing through the client's webform, I would tab to the dropdown box and then select High, Medium, or Low. After I set the value, I would like the correct word in the drop down to appear?
Apr 16 '07 #3
acoder
16,027 Expert Mod 8TB
What value you set is up to you (it depends on how you're going to deal with it on the server-side).

I'm not sure what you mean by the correct word not appearing in the dropdown. If you select a particular option it should stay selected unless you mean another dropdown should be selected with the same option?
Apr 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: cloverme | last post by:
Hi, I need help populating a listbox from a database on a webform. I created a an access database with a table, fields and data. Then I created a WebForm in vb.net and added a DropDownList...
5
by: tom | last post by:
I have a local Excel spreadsheet I am potentially migrating to MS Access. The thought was to use Access on the workstation for data-entry and subsequent generation of mailing labels and other...
3
by: trint | last post by:
Ok, I have tried to do this with the System.Web.UI and can't find anything for the webform. It seems much easier for a Winform. Any help in trapping Webform keydown event and keyup event is...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
2
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. When the file is dropped onto the listbox, the...
6
by: Tom | last post by:
Hi, I built an aspx page with c#. There are many textbox and a submit button. When I input data in form and click submit, I saw their values are null in debug window. I checked namespace is...
0
by: Angel | last post by:
i would like the comunity's opinion on validating a Webform. I was wondering should i validate data that the user enters on a Webform via a Backend process like SQL Server 2000 or should I use...
0
by: DC Gringo | last post by:
I am trying to output simply DataGrid of a coutry listing on a web form via a business object and XML web service...I receive no errors but no table HTML either. (I know the service and business...
1
by: admin.offshoredataentry | last post by:
Data Entry Outsourcing provides time bound, cost effective and qualitative Data Entry also provides numeric data entry, textual data entry, image data entry, data format, data conversion and also...
1
by: Data Entry Outsourcing | last post by:
Data Entry plays vital role in every business area. Data Entry is one such aspects of any business that needs to be handled properly for expanding your business. Data Entry is one of the leading...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.