Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

JavaScript Failure

See attached.

Note the JavaScript to run the function recalc_start when the onChange event is triggered for the date item (named sdate).

It does NOT do that. Notice the alert at the start of that function. NEVER displays.

Why?

Of course this is part of something bigger; I just cut it down to the essentials.

Thanks
jsfail.htm
calendar-usL.js
calendarL.css
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

It does get triggered. onChange event is triggered when you blur the field. in other words, make a change, and press tab. The alert will appear.

You do have JS errors on the page, but that has nothing to do with it.

Also, next time provide a link. You should not expect people to have to download your files to trouble shoot your code.
Avatar of Richard Korts

ASKER

To Kyle Hamilton,

It is difficult to give a link, it requires a login to a private site, I don't like to publish a logon on an open forum like this.

The fact remains, the onChange DOES NOT work. Why does not the alert, the FIRST line in the function occur?

Are you trying to say that when the change is made by the Calendar control, it is not considered a "change"?
you can provide a link by publishing the same three pages you posted here on a server.

i'm not sure i understand your question. are you getting the alert or no?

what browser are you using?

lets establish if you are getting the alert first, then we can move on to the actual error
the reference to the file was incorrect, hence the file was not found.

<script language="JavaScript" src="calendar-usL.js"></script>

I can't help you beyond that, since first, I have no idea what this is supposed to do, and second, it references external files
Please look at this: http://fwsprinklercdb.info/jsfail.htm

Do not pick a tech, leave that at None.

Click on the little calendar icon to the right of the date text box; the text box should have today's date. Pick a different date (like yesterday). Note that the new date will appear in the text box. To me, that is a change that should trigger the onChange event.

But maybe it isn't recognized as such because of the calendar control.
ASKER CERTIFIED SOLUTION
Avatar of Brian Tao
Brian Tao
Flag of Taiwan, Province of China image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial