473,465 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help ! keyword for the web - javascript

Hi,

I've created a form with 2 dialoglist fields: 1 state and 1 city.
I want to select a state, and I need a way to build the city list. In
order to do this, I've used the onChange event (on the state field)
and Javascript.

The script is:
st = this[this.selectedIndex].text
document.all("HidFrame[delete: lookupframe]").src= "/db.nsf
/CityLookup?ReadForm&state=" + ar;

I want to load the CityLookup page, but it doesn't work.
Do you know why?

Thanks, Lucie.
Jul 20 '05 #1
1 1655
lu*************@parexel.com (Lucie) writes:
I've created a form with 2 dialoglist fields: 1 state and 1 city.
I want to select a state, and I need a way to build the city list. In
order to do this, I've used the onChange event (on the state field)
and Javascript.

The script is: st = this[this.selectedIndex].text
you might mean
var st = this.options[this.selectedIndex].text
You don't use the variable "st" in the following.
document.all("HidFrame[delete: lookupframe]").src= "/db.nsf
document.all is a collection, and is supposed to be used as
document.all[ ... ], not as a function (although it does work).

Is the ID of the element really
"HidFrame[delete: lookupframe]"
(it is an illegal ID, they can't contain spaces or square brackets).
/CityLookup?ReadForm&state=" + ar;
I assume the linebreak is inserted by your news client.
You use a variable called "ar" that is not declared here.
Before sending strings as parts of URL's, they should be escaped,
i.e., change "ar" to "escape(ar)".
I want to load the CityLookup page, but it doesn't work.
Do you know why?


From this code, no. There is far too little information, and
we can't test it ourselves without the rest of the page.
You don't even say what happens. "Doesn't work" is not sufficient.

When asking for help with a program that doesn't work, always include:
1) What you did (sufficient code to reproduce problem, which browser to use,
which steps to go through to produce the error).
2) What you expected to happen (otherwise we can't fix the problem, just
nod and say "yes, we get the same").
3) What really happened (in case we can't reproduce the problem).
There is no such thing as too much detail when you are hunting for bugs.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

4
by: Derek | last post by:
Hi, I've built a rather large CGI that dumps a lot of data and a fairly complex javascript app out to the client's browser. Granted this may be poor style according to someone web design...
5
by: Michael Hagstrom | last post by:
Good Day - I have written a form which collects input for a fare calculation. The form collects the following: 1) Departure or Destination Group (1,2,or 3) 2) Number of Adults 3) Number of...
7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
7
by: ???????J | last post by:
Javascript may inquire the push down menu value, can I inquire the description? The following example, the variable($answer) can be get the menu1's value. For example, if I select first data,...
2
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
6
by: marktm | last post by:
Hi- I am trying to use setInterval to call a method within an object and have not had any luck. I get "Object doesn't support this property or method" when I execute the following code. What I...
1
by: john | last post by:
Hello, I am trying to convert a project from vb6 to vb.net. The code is a sample from an sdk for Canon digital camera's. I have gotten most of the issues resolved, but there are some that I am...
2
by: TastyKarma | last post by:
Was hoping somebody might have experienced this before. I have client-side javascript in my aspx files. For some reason when I place the "debugger;" keyword in my javascript, Visual Studio no...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
5
by: Samik2003 | last post by:
Hello, The problem is my query is not extracting the correct xml data from the database : Is there something which I am missing?? ANy help would be appriciated. Thanks, Sam. THis is the...
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
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
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...
1
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,...
0
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...
0
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...
0
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...

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.