473,804 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Submit, Dynamic Dropdown

I know I have done this but my mind is fried. I have a dynamic dropdown in
a form. I need to pull both the dynamic dropdown's ID and name listed in
the dropdown. Need a little help with grey matter tonight.

Thank
Jeff
Nov 22 '05 #1
7 2367
Jeff Uchtman wrote:
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


In server-side code? The only thing passed from your html during a
submission to the server-side code is the name-value pairs found in either
the Form or Querystring collections. You can't even tell the type of
controls that were the source of the name-value pairs.

Unless you store the ID's in a hidden field*, perhaps using xml, there is no
way to determine the ID's in server-side code.

Bob Barrows
* or make the ID's the same as the names - not recommended
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Nov 22 '05 #2
Perhaps store both the ID and the name in the value part such as
"345|Smith Company"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


Nov 22 '05 #3
The ususal thing I do is just to get the ID and then look up the name
(from the database) on the later Web page that needs that info.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


Nov 22 '05 #4
That was it. Pass both values and split on database entry. That worked
great.
Thanks
Jeff

<pa**@bullschmi dt.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Perhaps store both the ID and the name in the value part such as
"345|Smith Company"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.

Nov 22 '05 #5
Oh! I was thinking he wanted to get the SELECT element's id attribute ...

pa**@bullschmid t.com wrote:
Perhaps store both the ID and the name in the value part such as
"345|Smith Company"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #6
Exactly. I can't think of a situation where I would need to pass both values
in the form submission (which is why I thought he was talking about the
SELECT element's id ... )

pa**@bullschmid t.com wrote:
The ususal thing I do is just to get the ID and then look up the name
(from the database) on the later Web page that needs that info.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #7
Its a dynamic dropdown from another table. I need to pass two elements from
that table to the submint form. SPLIT worked great!

Jeff
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:eM******** ******@TK2MSFTN GP10.phx.gbl...
Exactly. I can't think of a situation where I would need to pass both
values
in the form submission (which is why I thought he was talking about the
SELECT element's id ... )

pa**@bullschmid t.com wrote:
The ususal thing I do is just to get the ID and then look up the name
(from the database) on the later Web page that needs that info.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
I know I have done this but my mind is fried. I have a dynamic
dropdown in a form. I need to pull both the dynamic dropdown's ID
and name listed in the dropdown. Need a little help with grey matter
tonight.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Nov 22 '05 #8

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

Similar topics

1
2586
by: jeffrobbins | last post by:
Hello, I am having an issue that I haven't been able to find an answer for. Any help or pointers to information would be appreciated. I have a form, lets call it mainForm, that contains a dropdownlist of offices that is populated from a database query, and other form elements. A second form, lets call it childForm, can be opened (window.open()) via a link off of mainForm to add another office to the database. What I would like is to be...
4
2716
by: assgar | last post by:
Hi I am stuck on a problem. I use 3 scripts(form, function and process). Development on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. The form displays multiple dynamic rows with chechboxs, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply.
2
7055
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, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
4
2638
by: Greg Scharlemann | last post by:
I'm trying to setup a dyamic dropdown list that displays a number of text fields based on the selected number in the dropdown. The problem I am running into is capturing the data already entered before the list is repopulated. For example, suppose the user selects 3 in the drop down list and 3 text fields are shown. If the user populates the 3 text fields with data and decides to change the drop down to a list of 4 or 5, how do I capture...
0
6198
by: josephkorn | last post by:
Hi all. I have a problem in my website in trying to prevent a user from double submitting the form. I am calling a subroutine from my page_load event that passes in the commandbutton that I want to prevent users from being able to click twice. Everything is working great, except for one small detail. When my client-side validation fires, and is invalid, I see the red text that displays the error message, but the problem is that something is...
12
3524
deephill
by: deephill | last post by:
hi i need form dependency. Can u check below code? <p>1. Are you married?</p> <p>
4
2728
by: tulika dutta | last post by:
i want to submit my form dynamicalyy through javascript. code: <script type="text/javascript"> function submitForm(){ document.accountForm.action="AccountInqury.jsp"; document.accountForm.submit(); } </script>
3
7025
by: phpnewbie2007 | last post by:
Hello, I have a dropdown which populates from a database. When user selects option 1 from the dropdown, he should be directed to sample.php, if he selects option 2, then to sampleb.php and so on. The code is as follows: <html> <head> <script language="JavaScript">
2
6473
by: Mike P | last post by:
Can you have 2 submit buttons in one <formelement? I have a form with a few dropdowns and textboxes that has a submit button to write the data to a database, but I also need a submit button next to one of the dropdowns to respond to whatever has been selected in the dropdown, which will then populate one of the text boxes. How can I do this? *** Sent via Developersdex http://www.developersdex.com ***
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9161
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.