Click to See Complete Forum and Search --> : Any ideas? I'm stumped...


azucker1
02-26-2003, 01:58 PM
I have an .asp file that isn't working correctly and I can't figure out why. I've believe I narrowed it down to a javascript error, and I was hoping someone can lend a hand.

Here's what's going on:
The page in question is a login page. When I login, I recieve the following error: "Error during login: A string literal was expected, but no opening quote character was found."

This error occurs on submit regardless of whether any information is submitted. (eg: user name, password)

In the attached file login.txt (renamed from login.asp) on line 108 it has the code: "alert("Error during login: " + xmlResponse.parseError.reason)" which I believe is where the problem culminates.

I have no idea what's going on as I'm new to javascript. If someone could PLEASE lend some advice as to what's going on I would be more than appreciative.

-AZ

Phil Karras
02-26-2003, 05:19 PM
That's nice, you gave us the error line but that's the the line causing the problem.

The problem is due to something that triggered that line, what's being checked before that line?

azucker1
02-26-2003, 05:24 PM
That's the thing. Not much. I'm just trying to verify the username and password. On the submit it runs the javascript and throws the error. :(

Any ideas?
-Adam

Phil Karras
02-27-2003, 09:30 AM
Sorry but there has to be something there causing the problem. Neither the submit button nor the error line itself are the cause! The button just submits the form, and the error line is only fired when there is an error.

Look at the <form ...> line to see if there's an onSubmit= I'll bet there is, then also see if there's a <script ... src='..."> line saying that it loads a JS file, then see if the onSubmit= is calling a function inside the JS file.

That's probably where the error is, unless the function being called is in the HTML file.