javascript and ASP

R

Robert L.

Hi,

I'm trying to make a small software on my web page.

<html>
<head><title><% Res 30 %></title>
<SCRIPT LANGUAGE="JavaScript" SRC="DynList.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var listB = New DynamicOptionList("B","A");
var listC = New DynamicOptionList("C","A","B");
........
</script>

<SELECT NAME="B" LANGUAGE="JavaScript" onChange="listC.populate();">
<SCRIPT LANGUAGE="JavaScript">listB.printOptions()</SCRIPT>
</SELECT>
......

1- There's an error telling me i'm missing a ";" on this line
(listB.printOptions() ). If put a ; before and/or after this call, it tell
me the same thing. Is it possible that the error is inside this function?
2- listB is undefined. Why? It's a global var.
 
D

Dave Anderson

Robert L. said:
var listB = New DynamicOptionList("B","A");
var listC = New DynamicOptionList("C","A","B");

Assuming you define DynamicOptionList somewhere, try using the keyword [new]
instead of [New].

JScript is case-sensitive.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
R

Robert L.

My code is working now.
The DynamcOptionList was define inside the DynList.js, I use the class at
http://www.mattkruse.com/javascript/dynamicoptionlist/source.html (like Mark
Henri write in previous reply )

Thanks a lot.

Robert

Dave Anderson said:
Robert L. said:
var listB = New DynamicOptionList("B","A");
var listC = New DynamicOptionList("C","A","B");

Assuming you define DynamicOptionList somewhere, try using the keyword [new]
instead of [New].

JScript is case-sensitive.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top