473,659 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying value selected in Drop-down control throu CGI

1 New Member
HI..

I wana display that, initially in a one drop down control there will be some values.
Initially, 2nd drop down control will be disabled. if user selects 1st drop down then and then only value which user has selected in 1st drop down control will be displayed in 2nd drop down control. The values can be selected randomly.

Plz tell me.
May 21 '07 #1
5 3952
KevinADC
4,059 Recognized Expert Specialist
Are you wanting to do this in the browser? Then use javascript. If you want to do it server side with perl, use the CGI module to get the form data to display whatever it is you need to display.
May 21 '07 #2
tsunethere
6 New Member
hi .. thanks for reply

I want to do it server side with perl only. I have 2 drop-down boxes. at first when web page will get load value this drop-down value will be"---" in this fashion. and 2nd drop-down will be disabled. unless and until user selects item from 1st drop-down 2nd will be disabled. As soon as user enter value in 1st drop-down, 2nd will get enabled and user can select value in 2nd drop-down!

I want to do like this :
if (value in drop-down1 is changed)
{
if(item value="--")
{
drop-down2.disabled= "true";
}
get value from database;
}

how can I code above logic in CGI?
how can I call this code on drop-down1`s onchange() ?

Also can u plz briefly explain on CGI module to get the form data to display?


Thank you.
May 22 '07 #3
KevinADC
4,059 Recognized Expert Specialist
You probably want to use AJAX so ask in the AJAX forum.

http://www.thescripts.com/forum/forum184.html
May 22 '07 #4
tsunethere
6 New Member
thanks alot..

like in .NET we hv runat="server"
do you know how to handle server side events for Perl?
is there any other solution for this in Perl?


thanks
i m badly in need of it..
May 22 '07 #5
KevinADC
4,059 Recognized Expert Specialist
Perl has no concept of "events" that I am aware of. There are some perl modules that create ajax code, but of course that is a combination of javascript and perl code. The javascript works in the browser to dynamically update parts of a webpage using perl on the server. I am sure it could be used to do what you want, but I don't know how to do it myslef. Or you could go with a pure perl solution but that would not include "disabling" a drop down menu as perl has no concept of what happens in the browser window. You could print a form with a drop down menu, and send the form data to a perl script. The perl script will evaluate the values of the form fields and can dynamically generate another form depending on the values from the first form. You would use conditional statements for that.
May 22 '07 #6

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

Similar topics

4
8469
by: Dariusz | last post by:
I have constructed a PHP generated HTML layout, which on POSTing the menu option the user selects, calls the same PHP code / page which generates the HTML page and GET's the correct SHTML page into the design (kind of like frames but without the annoyance of frames). Whilst for all other pages I have on my layout the correct page is shown in the browsers address bar (and hence if I copy and paste that URL into the browser the correct...
8
10223
by: Lisa | last post by:
I have a drop down that defaults to "select" after the page refreshes. How do I keep the selected value in the dropdown field... I've tried EVERYTHING and nothing works! :( <script LANGUAGE="JavaScript"> function getServer(form){ var cdoServerName = document.frmSoftware.cdoServerName.options.value;
2
1966
by: mike | last post by:
Am I correct in assuming that when the starting value of a select list is re-selected, the onChange command does not execute? I need to have it execute when the original value is selected if possible. -- Mike
7
14668
by: What-a-Tool | last post by:
Have an Access table loaded into a DataTable that was created at run time, and am displaying these contents in a data grid. Me.dgGames.DataSource = Me.DsGameInfo.Tables("Games") I would like to display only a selected few of the columns, rather than the whole table. Is this possible? Thanks - Sean
1
1481
by: vishnu | last post by:
Hi, I have a fully editable datagrid which has dropdownlist in two columns. Now i have to bind the dropdown in the second column based on the value selected in the dropdown in the firstcolumn. so how to do it. I am able to raise the selected index changed event of the dropdowns in the first column, but i am not able to get the reference for the dropdown in the corresponding row. Regards, Vishnucharan.
0
1077
by: planetthoughtful | last post by:
Hi All, I have a c# web form that has two listviews on it. Both currently retrieve their list entries from two separate tables in an SQLServer backend. I've been asked to make the values in the listview on the right dependent on the value selected in the listview on the left. Given my PHP background, I would normally have used Javascript to achieve this, but I don't know if that's the best (or even a possible) way of achieving the...
10
8503
by: bettyboo | last post by:
Hi all I got some really useful advice from here with my last question so I'm back for more! Only my second post so please bear with me - I'm very new to this so this will probably not be as concise as it could be (I'm having a bit of trouble expressing myself and am not sure what's important to include!). I'm trying to build a database for a driving instructor acquaintance and have a form to enter pupil details, f_Pupils. Each pupil...
3
3068
by: niths | last post by:
hello everybody, i had created a dropdown in which project names will be appeared. and i am getting those project name from backend. Below that dropdown i am having a table of users with a check box.so whenever i select a projectname and click on the checkbox of one user, that projectname and username should store in project assign table. The problem is username is storing but the projectname is not storing in the database. it is displaying...
0
1506
by: apeg | last post by:
Hi Guys. I have a problem in displaying the data in my report viewer which is crystal report based on the value of checkbox. When i select and check multiple item that i want to print, only one item is in my report viewer. Can anyone help me on my problem? This is my code and sample picture. Private Sub Form_Load() Dim i As Integer Dim s As String Screen.MousePointer = vbHourglass
3
2522
by: Diana Miller | last post by:
Hi All, I am creating a report from Access 2007. I have a form where the user selects a Month from a combo box and then presses a button to show the sum of all pages worked for the Month selected in the combo box. I am populating the combo box from the database and everything there works great. My problem is this: How do I code the button/combo box to take the value selected by the user in the combo box and then calculate the total...
0
8427
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
8330
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
8850
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
7355
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...
1
6178
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1737
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.