Click to See Complete Forum and Search --> : Broken function


sorusty
04-07-2003, 12:51 AM
Hello!

I've been pulling my hair out and hope somebody can help.

This code snippet:

function read_form(a) {
if (!set_vars(a)){
return false; }
if ((!a.date1.value) || (!a.date2.value)) {
alert('Please enter start and end dates.');
a.date1.focus();
return false; }
a.arg0.value+='-e '+a.date1.value+'-'+a.date2.value';
if (a.pipe_flag.checked) {
a.arg9.value='-l'; }
if (a.int_flag.checked) {
a.arg9.value+=' -I'; }
if (a.demo_flag.checked) {
a.arg9.value+=' -N'; }
return true; }

doesn't work, and causes the other functions in the page not to work. If I comment out the above, everything else works fine.

Any thoughts would be welcome

Tx,
Feeling stupid

khalidali63
04-07-2003, 01:17 AM
Since you did not post other code,its not easy to guess,however,if this code causes other code to not work then most certainly there are some variable/function names which are duplicate. Make sure you have unique names

Cheers

Khalid

sorusty
04-07-2003, 01:25 AM
I do not see any duplicates, but I am almost cross-eyed at this point.

I have attached the code for the whole page, perhaps that will enable someone to tell me what dumb thing I am doing.

Thanks.

khalidali63
04-07-2003, 01:31 AM
let me know what exactly is not workin on this page

http://68.145.35.86/temp/SyntaxProblem-sorusty.html

Cheers

Khalid

sorusty
04-07-2003, 01:43 AM
I told you I was cross-eyed. That one quote cost me two hours.

Many thanks, Khalid.

:D

khalidali63
04-07-2003, 01:45 AM
:D

My pleasure my friend

I honestly hate this.Some time I have noticed that I just have to have some one take a look and just show me the damn obvious error

Glad to be of any help

Cheers

Khalid