Hi every body
I would like connect three combo box ( CascadingDropDo wn with a Database) MYSQL by asp classic or Java Script .
But I have a problem with this example , when I will change City , returen the curser to the old select -City .
Can you Solve this problem for me.
Thanks 3 5513 jhardman 3,406
Recognized Expert Specialist
just trying to make sure I understand you - you say that after the user makes one selection you want to move the cursor to another <select> box?
Jared
BTW, please put your code in [ code] [/ code] tags, it makes it much more readable
Yes I want move a cursor to select a city , for example when I Select Berlin , in combobox2 , stop the cursor in the Berlin City.
For Example: Combo box 1 : Country : Germany
Combo box 2 : City : Berlin
Combo box 3: State : G1
For More detail :
When I Select Germany in the Country Combo box 1, Show all City of Germany in the Next Combo box (Combo box2) , and when I Select Berlin in the ( Combo box2) , Return the cursor to Hamborg City ??? I have a problem in (combo box2) ?
Thanks for response us.
jhardman 3,406
Recognized Expert Specialist
OK, this is a fairly common problem, moving the cursor is going to have to be done with javascript, there's no way around that. ASP only works on the server, all ASP code is inactive by the time it gets to the user. The code to move a dursor is going to be something like this: - <select name="country" onSelect="this.form.city.focus()">
-
'...
-
</select>
-
<select name="city">
Does this make sense? It's been a while since I've done javascript, but it's something like that.
The other part of the question you seem to be asking is how to limit the results of the second select based on the first choice, so if the user chooses "germany" in the first box, he sees "Berlin, Hamburg, etc" in the second. As I mentioned earlier, the ASP code is inactive by the time it gets to the client's browser, so if you want to use ASP to limit the options in the second select box, you need to submit the form (onSelect="this .form.submit()" ) and then use asp to resend the form with the new data in place in the second box. Does this make sense? If you need help with any part of this task, please ask.
On the other hand, this might slow down the user's experience, and although I've seen plenty of professional sites that use this method, a lot of people use a pure javascript technique wherein all of the possibilities are sent to the user, and after the selection is made a javascript function alters the second select box accordingly. You will have to ask a javascript expert for that method.
There is also one other possibility, the technology "Ajax" was invented to handle exactly this type of issue, and it can communicate back to the server to refresh the list for the second select in real time. This is probably the preferred method nowadays.
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mr Dygi |
last post by:
Hi,
PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a
problem with this simple code:
<?php
$link = mysql_connect("127.0.0.1","","")
or die("Could not connect: " . mysql_error());
echo "Connected successfully";
mysql_close($link);
|
by: pieter_hordijk |
last post by:
Hi all,
maybe this isn't a php question, but a MySQL question.
If so I'm sorry for asking you guys to help me :)
I know this question is asked often in NGs, but I couldn't find the
answer that works for me.
I've just installed my server with following:
|
by: D. K. |
last post by:
Hi;
I have installed suse 8.2 a short while ago and at my first attempt to connect mysql (via shell and a perl dbi script) i get following error:
can't connect to mysql server through socjet '/var/lib/mysql/mysql.sock'.
i know this looks like a common error and I am terribly sorry if this kind of subject has been posted before but I'll appreciate any urgent help.
Thanks
Devrim
...
|
by: Denis Labon |
last post by:
I can't connect to mysql server using the mysql-connector-java-3.0.11.
I was able to run the same program when I was running Suse 9.0 but
since I install Suse 9.1, I can't connect.
The error message is:
java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.ConnectException: Connection refused
I'm using mysql-standard-4.0.14 and able to get in the mysql server by
typing:
bin/mysql -uroot -ptest
|
by: Ike |
last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote
computer. I can connect fine via php. I cann connect fine via Java, through
a servlet, when the servlet is on the same machine (localhost) as the MySQL
DB.
However, when they are on different machines with different IPs, calling
across the Internet (and there are no firewall issues -- I can connect fine
to the remote MySQL DB via php from the same machine, not...
| |
by: iceboy |
last post by:
Hello to all,I have a problem to connect PHP & MySQL together.
I have created a form that gets the username & password from admin and connect him to database.the part of PHP script that connect to mysql is as follow:
$db=mysql_pconnect("hostname",$username,$password);
if(!$db){
echo"ERROR:connecting failed";
exit; }
else
echo"you have connected to database succsessfully";
I want to know what should i write instead of "hostname"...
|
by: Ankur |
last post by:
Hi Folks,
I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".
I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.
|
by: hkma08 |
last post by:
I dont know I should post JSP error in here or not. If not please redirect me to another one. Thx.
I just installed apache tomcat with mysql with java, but i got error when try to connect to mysql database, what is happening? Here is my error msg:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 3 in the jsp file: /tutorial/test.jsp
Syntax error on tokens, delete these tokens
<%@ page...
|
by: Anthony Jones |
last post by:
"paulmitchell507" <paulmitchell507@googlemail.comwrote in message
news:effe22fb-7c85-4172-953d-d6546cd548f8@c58g2000hsc.googlegroups.com...
On Aug 12, 1:06 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
Paul,
When you ask for help you will most likely get responses that ask you
questions so that what you are doing is better understood and the help can
be more targeted. Its very frustating trying to help someone when they
won't...
|
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...
|
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,...
| |
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |